Jump to content

infekt_x

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

infekt_x's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. shoz! that is it! thanks alot man! thanks both you guys. (fenway/shoz)
  2. 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??
  3. 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.
  4. 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?
  5. 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!
  6. Im having a problem getting the results im looking for using only ONE query... here are my tables: thanks alot!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.