machnhed1 Posted June 11, 2003 Share Posted June 11, 2003 Hi, Apparently I am not up on my MySQL because I can\'t figure out how this statement works. After a day of tinkering I have a vague idea of what it does, but when I go to modify it I almost always end up getting an SQL error. I was hoping someone could do a line by line explanation of how this sucker is processed. $search_query_count = "select count(*) from $sql_tbl[products], $sql_tbl[pricing], $sql_tbl[categories] where $sql_tbl[pricing].productid=$sql_tbl[products].productid and $sql_tbl[pricing].quantity=1 and $sql_tbl[products].categoryid=$sql_tbl[categories].categoryid $membership_condition and ($sql_tbl[pricing].membership=\'". $user_account[\'membership\']."\' or $sql_tbl[pricing].membership=\'\') and ($sql_tbl[products].product like \'%$substring%\' or $sql_tbl[products].descr like \'%$substring%\') and $sql_tbl[categories].category like \'$search_category%\' and $sql_tbl[products].forsale=\'Y\' and $sql_tbl[categories].avail=\'Y\' $price_condition group by $sql_tbl[products].productid"; Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/576-mysql-statement-explanation/ 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.