Could you please help me:
$sql = "SELECT qualityId FROM quality WHERE qualityName = 'VVS'";
$r = $d->selectQueryQuality($sql);
$sql = "INSERT INTO stones (size, price, qualityId) VALUES(?,?,$r)";
$c->insertMySQL($sql, 9, 14, 3, 18, $check );
As you see in the 3rd statement, I'm trying to use instead of the 3rd
question mark a variable, but this gives me an error: Could not
prepare query: INSERT INTO stones (size, price, qualityId)
VALUES(?,?,)
The error shows that at the last position there's no ? (of course),
but also no value.
How can I make that the value shows up there and how can I make that I
can execute the $pdo->prepare if in one place there's a value instead
of "?"?
Thanks a lot for your help.