Hi all,
I have a line of code:
$sql="Update Orders Set Quantity=" . $_POST[quantity . $i] ." Where CartNumber=" . $_SESSION['cartnum'] . " And ProductID='" . $_POST[Product . $i] . "'";
When processed the last "'" does not appear, as if the last concatenation operator (the last dot) is being ignored. For example I get this:
Update Orders Set Quantity=3 Where CartNumber=48 And ProductID='trumpet
In other words I am not getting that last apostrophe to appear, which is necessary to make a valid SQL Update statement (since ProductID is a text based field)
Any ideas why this is happening?
Thanks,
KB
I have a line of code:
$sql="Update Orders Set Quantity=" . $_POST[quantity . $i] ." Where CartNumber=" . $_SESSION['cartnum'] . " And ProductID='" . $_POST[Product . $i] . "'";
When processed the last "'" does not appear, as if the last concatenation operator (the last dot) is being ignored. For example I get this:
Update Orders Set Quantity=3 Where CartNumber=48 And ProductID='trumpet
In other words I am not getting that last apostrophe to appear, which is necessary to make a valid SQL Update statement (since ProductID is a text based field)
Any ideas why this is happening?
Thanks,
KB