whiteboikyle Posted February 10, 2009 Share Posted February 10, 2009 query("SELECT * FROM `hours` WHERE `finished` = '0' & `name` = '$name'"); Is that how you do 2 Where statements because it wont work for some odd reason. Quote Link to comment https://forums.phpfreaks.com/topic/144559-solved-2-where-statments-mysql/ Share on other sites More sharing options...
jeger003 Posted February 10, 2009 Share Posted February 10, 2009 query("SELECT * FROM `hours` WHERE `finished` = '0' & `name` = '$name'"); Is that how you do 2 Where statements because it wont work for some odd reason. Not really sure if that works but I know if you use AND instead of &....it will work. Quote Link to comment https://forums.phpfreaks.com/topic/144559-solved-2-where-statments-mysql/#findComment-758612 Share on other sites More sharing options...
trq Posted February 10, 2009 Share Posted February 10, 2009 & should be && or AND Quote Link to comment https://forums.phpfreaks.com/topic/144559-solved-2-where-statments-mysql/#findComment-758613 Share on other sites More sharing options...
whiteboikyle Posted February 10, 2009 Author Share Posted February 10, 2009 I should of guessed that but i was thinking that was only used for PHP not mysql.. THANKS! Quote Link to comment https://forums.phpfreaks.com/topic/144559-solved-2-where-statments-mysql/#findComment-758617 Share on other sites More sharing options...
aschk Posted February 10, 2009 Share Posted February 10, 2009 Use the words "AND" and "OR" for better semantic understanding. Thus avoiding confusion when switching between languages. p.s. "&" is a bitwise operator in both PHP and MySQL I believe. Quote Link to comment https://forums.phpfreaks.com/topic/144559-solved-2-where-statments-mysql/#findComment-758842 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.