talas Posted May 9, 2008 Share Posted May 9, 2008 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 More sharing options...
NorthWestSimulations Posted May 9, 2008 Share Posted May 9, 2008 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>'; Link to comment https://forums.phpfreaks.com/topic/104804-solved-phpmysql-mysql_fetch_array-error/#findComment-536505 Share on other sites More sharing options...
talas Posted May 9, 2008 Author Share Posted May 9, 2008 No, still is giving me that error. Link to comment https://forums.phpfreaks.com/topic/104804-solved-phpmysql-mysql_fetch_array-error/#findComment-536516 Share on other sites More sharing options...
talas Posted May 9, 2008 Author Share Posted May 9, 2008 I got it figured out, I just modified the code from http://www.phpfreaks.com/forums/index.php/topic,95443.0.html and made it do what I wanted. Now working on additional things for the system I am building. Link to comment https://forums.phpfreaks.com/topic/104804-solved-phpmysql-mysql_fetch_array-error/#findComment-536524 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.