MarcusZ Posted March 29, 2010 Share Posted March 29, 2010 Hi. I was wondering how to use WHERE and a variable in a query. I get an error message with this code: $result = mysql_query('SELECT * FROM `reply` WHERE `id`=$date', $con); Thanks Link to comment https://forums.phpfreaks.com/topic/196849-where-variable/ Share on other sites More sharing options...
fenway Posted March 29, 2010 Share Posted March 29, 2010 What error message?????? Link to comment https://forums.phpfreaks.com/topic/196849-where-variable/#findComment-1033424 Share on other sites More sharing options...
MarcusZ Posted March 29, 2010 Author Share Posted March 29, 2010 I solved it myself. The error message was something like: couldn't find $mdate coloumn. But this code is working now: $result = mysql_query("SELECT * FROM `reply` WHERE `id`='$date'", $con); Link to comment https://forums.phpfreaks.com/topic/196849-where-variable/#findComment-1033432 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.