Jump to content

mysql_fetch_array()


bravo14

Recommended Posts

Hi guys

 

I have the following error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/sites/yardleyhc.co.uk/public_html/bravo14/main.php on line 31

when using the following code, the database connection has already been made before this point

        <?php
$team = ('SELECT * FROM `tbl_team_menu` where `page` <>"main.php" and  `team_id`\'' . $_GET['team_id'] . '\'');
$teamresult=mysql_query($team);
while($teamrow = mysql_fetch_array($teamresult)) 
{
      echo('<a href="'.$teamrow['page'].'?team_id='.$teamrow['team_id'].'"><img src="images/menu/'.$teamrow['button'].'" border="0"></a>');
}
?>

 

Can anyone point out where I have gone wrong?

Link to comment
https://forums.phpfreaks.com/topic/147471-mysql_fetch_array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.