infekt_x
-
Posts
6 -
Joined
-
Last visited
Never
Posts posted by infekt_x
-
-
looks like subqueries aren't supported until mysql 4.1 and im running 4.0 as fenway already mentioned I needed above.
thanks fenway!
any solutions for mysql 4.0, anyone??
-
Here is the error:
ERROR: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT team_name FROM tbl_teams WHERE team_id=g.team_home with query:
the query isn't showing up cause $sql is empty.
-
that makes sooo much sense..
but I keep getting an error.
here is my sql:
$sql=mysql_query("SELECT (SELECT team_name FROM tbl_teams WHERE team_id='g.team_home') AS home_team, (SELECT team_name FROM tbl_teams WHERE team_id='g.team_away') AS away_team FROM tbl_photo_games AS g");
i have tried the above code without the single quotes around the team_id='g.team_home' as well.
and the error:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource
does it need to be handled differently as its in php?
-
uid? is that team_id?
also, team_home (in the first sub select) is in the games table, yet the sub select is only addressing the teams table.... do I need to do a JOIN?
thanks for you help!
-
Im having a problem getting the results im looking for using only ONE query...
here are my tables:
thanks alot!
simple fix with JUST ONE query??
in MySQL Help
Posted
shoz! that is it!
thanks alot man!
thanks both you guys. (fenway/shoz)