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 Quote 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?????? Quote 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); Quote Link to comment https://forums.phpfreaks.com/topic/196849-where-variable/#findComment-1033432 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.