whiteboikyle Posted July 10, 2008 Share Posted July 10, 2008 Okay well here is my long php query.. select username, image, ranks.rName, members.ID, timestamp, aim, categories.ID, categories.name from members, ranks, ranklookup, categories where members.rank = ranks.id and ranks.id = ranklookup.rid and categories.id = ranklookup.cid and categories.id = ' . $cid . ' and disabled = 0 ORDER BY ranks.ID desc; now there is 2 ID's that come up in this situation.. 1 ID is for the ranks.. and the other ID is the members.. So would i echo either 1 using $row = mysql_fetch_array($result); if i put $row['ID'] it could get confused? Link to comment https://forums.phpfreaks.com/topic/114161-double-query-help/ Share on other sites More sharing options...
lvtrii Posted July 10, 2008 Share Posted July 10, 2008 It'd spit out it's dummy and say that it can't tell which you want; Try using: select username, image, ranks.rName, members.ID as memID, timestamp, aim, categories.ID as catID, categories.name from members, ranks, ranklookup, categories where members.rank = ranks.id and ranks.id = ranklookup.rid and categories.id = ranklookup.cid and categories.id = ' . $cid . ' and disabled = 0 ORDER BY ranks.ID desc; then use $row['catID'] and $row['memID'] as required Link to comment https://forums.phpfreaks.com/topic/114161-double-query-help/#findComment-586927 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.