View Single Post
Old 12-17-2009, 02:47 AM  
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
Mysql $query = Update $variable field quick php question

First time using the update command.

Basically trying to change the status from 1 to 2 which works with this query without the $id variable I inserted. Anyone know how I format the $id variable properly in this query?


mysql_select_db($mysql);
$query = 'UPDATE `sms`.`messages_import` SET `timestamp` = NOW(), `status` = \'2\' WHERE `messages_import`.`id` = `"$.id."` LIMIT 1;';


Again I tried a few common variations that I knew of like $id, '$id', etc but nothing seemed to work

Mucho appreciatedo
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote