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 Link to comment https://forums.phpfreaks.com/topic/117496-solved-quick-question/ 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'"; Link to comment https://forums.phpfreaks.com/topic/117496-solved-quick-question/#findComment-604357 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.