I am having an issue with a defined integer when updating a row in mysql.
More precisely:- I am entering 2 as the field value, and when I go to view the row, the field is set to 1.
Here is my SQL command:
$DB->query("UPDATE Listings SET Type='2' AND Status='Available' WHERE LID='$LID'");
The query itself executes fine, the value is updated and the correct row is chosen. It is the 'Type' field that is the problem. The field type is tinyint.
Totally stumped here, please help!
Edit: Please note the passing of variables in this manner can allow for SQL Injection. NOT RECOMMENDED