Ell20 Posted July 31, 2008 Share Posted July 31, 2008 Hi, I have a query $query = "SELECT * FROM dom_london WHERE player_id = '$id'"; $result = mysql_query($query); $rows = mysql_num_rows($result); Which basically counts the number of rows. How would I go about adding an extra table to this query and counting the rows WHERE player_id = '$id'?? Thanks for your help Quote Link to comment Share on other sites More sharing options...
nEJC Posted July 31, 2008 Share Posted July 31, 2008 If I understand you correctly look at SELECT UNION And btw. are you counting rows in a loop? Why don't you let SQL server do this for you? $query = "SELECT count(*) FROM dom_london WHERE player_id = '$id'"; Quote Link to comment 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.