AbydosGater Posted November 5, 2006 Share Posted November 5, 2006 Hi, in my query...$query_reviews = "SELECT * FROM reviews WHERE epnumber = '$ep' AND auth = 1"That works fine, without problems, but if i add another AND in there it gives me errorsHow do i have more then one And, so that it only pulls where epnumber = $ep and auth = 1 and say author = 2, how would i do this??Please help Link to comment https://forums.phpfreaks.com/topic/26237-more-then-1-and-in-sql-causing-problems/ Share on other sites More sharing options...
alpine Posted November 5, 2006 Share Posted November 5, 2006 This should be posted in the MySql section.However, several AND's should be ok, what error do you get?[code]<?php$query_reviews = mysql_query("SELECT * FROM reviews WHERE epnumber = '$ep' AND auth = 1 AND author = 2") or die(mysql_error());?>[/code] Link to comment https://forums.phpfreaks.com/topic/26237-more-then-1-and-in-sql-causing-problems/#findComment-120022 Share on other sites More sharing options...
AbydosGater Posted November 5, 2006 Author Share Posted November 5, 2006 Oh i tryed again, and its working now! no problems!Thanks! Link to comment https://forums.phpfreaks.com/topic/26237-more-then-1-and-in-sql-causing-problems/#findComment-120029 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.