flemingmike Posted October 12, 2010 Share Posted October 12, 2010 hello, im trying to figure out how to have multiple where's. $result3 = mysql_query("SELECT * FROM customer WHERE customer = '$customer'"); sometimes there are 3 customers with the same $customer. can i add to that line WHERE contact = '$contact?'; Link to comment https://forums.phpfreaks.com/topic/215701-can-i-have-where-aa-and-bb/ Share on other sites More sharing options...
BlueSkyIS Posted October 12, 2010 Share Posted October 12, 2010 are you looking for AND? $result3 = mysql_query("SELECT * FROM customer WHERE customer = '$customer' AND contact = '$contact'"); Link to comment https://forums.phpfreaks.com/topic/215701-can-i-have-where-aa-and-bb/#findComment-1121471 Share on other sites More sharing options...
Pikachu2000 Posted October 12, 2010 Share Posted October 12, 2010 $result3 = mysql_query("SELECT * FROM customer WHERE customer = '$customer' AND `another_field` = '$another_value' AND `etc` = '$etc'"); Link to comment https://forums.phpfreaks.com/topic/215701-can-i-have-where-aa-and-bb/#findComment-1121472 Share on other sites More sharing options...
flemingmike Posted October 12, 2010 Author Share Posted October 12, 2010 thanks guys. 45min on google and 45 sec on phpfreaks. Link to comment https://forums.phpfreaks.com/topic/215701-can-i-have-where-aa-and-bb/#findComment-1121473 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.