Wolfsoap Posted January 25, 2008 Share Posted January 25, 2008 "SELECT * FROM journal WHERE tags='$tagName', date BETWEEN '1990-01-01' AND $now" am i doing multiple where clauses right, cos this dosen't work. cheers Quote Link to comment https://forums.phpfreaks.com/topic/87829-solved-more-uncooth-sql/ Share on other sites More sharing options...
p2grace Posted January 25, 2008 Share Posted January 25, 2008 You don't use commas in where statements. $query = "SELECT * FROM `journal` WHERE `tags` = '$tagName' AND `date` BETWEEN '1990-01-01' AND '$now'"; $run = mysql_query($query); Quote Link to comment https://forums.phpfreaks.com/topic/87829-solved-more-uncooth-sql/#findComment-449290 Share on other sites More sharing options...
Wolfsoap Posted January 25, 2008 Author Share Posted January 25, 2008 cheers man, it didnt need the ' ' around $now but it works a charm. thanks. Quote Link to comment https://forums.phpfreaks.com/topic/87829-solved-more-uncooth-sql/#findComment-449292 Share on other sites More sharing options...
p2grace Posted January 25, 2008 Share Posted January 25, 2008 Glad I could help... would you mind hitting the "Topic Solved" button. Thanks Edit: Sorry I see you already did! Quote Link to comment https://forums.phpfreaks.com/topic/87829-solved-more-uncooth-sql/#findComment-449293 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.