Cagecrawler Posted September 26, 2007 Share Posted September 26, 2007 I may be off-track but do you actually need the "as num" part after count(tries2.playerID)? I assume it's to convert it to a number (I've never used it), but a) don't you need CAST() and b) doesn't count return a number anyway? As the JOIN uses AS for aliases, it might be mucking it up. I'm probably wrong, but I thought I'd say it anyway. Quote Link to comment https://forums.phpfreaks.com/topic/70136-solved-combining-results-from-2-arrays/page/2/#findComment-355361 Share on other sites More sharing options...
Barand Posted September 26, 2007 Share Posted September 26, 2007 "as num" is is a column alias to give it a column name so you can referance it as $row['num'] when processing the query results. Quote Link to comment https://forums.phpfreaks.com/topic/70136-solved-combining-results-from-2-arrays/page/2/#findComment-355364 Share on other sites More sharing options...
Cagecrawler Posted September 26, 2007 Share Posted September 26, 2007 Ah... my bad. Ignore me... Quote Link to comment https://forums.phpfreaks.com/topic/70136-solved-combining-results-from-2-arrays/page/2/#findComment-355367 Share on other sites More sharing options...
padams Posted September 27, 2007 Author Share Posted September 27, 2007 Barand, your solution does work on mySql 5.0. I had my site migrated to a new server and it now works fine, so it was clearly an issue with the older version of mySQL (3.23). Not sure what particular part of the query was the problem, but I'm guessing the join or on statement was causing the grief. Thanks again for all the help! Quote Link to comment https://forums.phpfreaks.com/topic/70136-solved-combining-results-from-2-arrays/page/2/#findComment-356245 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.