archux Posted January 3, 2007 Report Posted January 3, 2007 (edited) Sveiki! Lieta tāda, ka es savienoju php ar msql datubāzi. Bet nesaprotu kā lai ieliek iekšā šo: album_id=$album_id kods ir šāds: $result = dbquery( "SELECT tp.*, tu.user_id,user_name, SUM(tr.rating_vote) AS sum_rating, COUNT(tr.rating_item_id) AS count_votes FROM ".$db_prefix."photos tp LEFT JOIN ".$db_prefix."users tu ON tp.photo_user=tu.user_id LEFT JOIN ".$db_prefix."ratings tr ON tr.rating_item_id = tp.photo_id AND tr.rating_type='P' WHERE photo_user=user_id GROUP BY photo_id ORDER BY photo_order LIMIT $rowstart,".$settings['thumbs_per_page'] ); Pēc visa viņam jābūt iekš WHERE, bet vai var 2 ievietot? Ja var tad kā? Pasakat lūdzu! Edited January 3, 2007 by archux
archux Posted January 3, 2007 Author Report Posted January 3, 2007 paldies atradu pats :D and jaaliek pa vidu un atiet :)
Recommended Posts