Jump to content

[SOLVED] PHP/MySQL mysql_fetch_array() error


talas

Recommended Posts

Hello all,

I am in need.  I am programming a page where leaders of a club can look over and accept new members, but I am always getting a fetch_array error.

 

Here is the error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/ftpgroup/flh/public_html/ams/admin/apps.php on line 37

 

Here is the block of code I am using:

$sql = 'SELECT name FROM about WHERE flh=nonmember';
$result = mysql_query($sql,$con);

echo'
<table>
<tr>
       <th>In-Process Applications</th>
</tr>';

while($row = mysql_fetch_array($result,MYSQL_BOTH)){
extract($row);
echo'
<tr>
       <td><a href="?member=$data">$data</a></td>
</tr>';
}
echo'</table>'; 

 

Any help to solve this would be appreciated!

Link to comment
https://forums.phpfreaks.com/topic/104804-solved-phpmysql-mysql_fetch_array-error/
Share on other sites

Try this I have the same error not 5 minutes ago.

$sql = "SELECT `name` FROM `about` WHERE flh = 'nonmember'";
$result = mysql_query($sql,$con);

echo'
<table>
<tr>
       <th>In-Process Applications</th>
</tr>';

while($row = mysql_fetch_array($result,MYSQL_BOTH)){
extract($row);
echo'
<tr>
       <td><a href="?member=$data">$data</a></td>
</tr>';
}
echo'</table>'; 

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.