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? Quote Link to comment 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 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.