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 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); 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. 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! Link to comment https://forums.phpfreaks.com/topic/87829-solved-more-uncooth-sql/#findComment-449293 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.