Use of variables in a MySQL Update Query
Posted: Mon Jun 30, 2008 5:47 am
This works:
$sql = 'UPDATE Requests SET requested_date=\'2007-01-01\' WHERE request_number=\'0\'';
However, I am have not been able to come up with the proper syntax for replacing the constants in the query with variables.
The variables are $requested_date and $request_number.
What is the correct syntax for using those variables in the Update query?
Thanks,
Roger
$sql = 'UPDATE Requests SET requested_date=\'2007-01-01\' WHERE request_number=\'0\'';
However, I am have not been able to come up with the proper syntax for replacing the constants in the query with variables.
The variables are $requested_date and $request_number.
What is the correct syntax for using those variables in the Update query?
Thanks,
Roger