Jump to content

[SOLVED] mysql fetch array error


SEVIZ

Recommended Posts

Here is my code

<?php
$con = mysql_connect("--------","------------","-----------");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

$result = mysql_query("SELECT * FROM sprint WHERE id=7710");

while($row = mysql_fetch_array($result))
  {
  echo $row['num'] . " " . $row['name'];
  }

?>

 

I get this error:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /techdb.php on line 10

 

What am I missing here?

Link to comment
https://forums.phpfreaks.com/topic/157744-solved-mysql-fetch-array-error/
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.