maxudaskin Posted July 11, 2007 Share Posted July 11, 2007 Is this correct? mysql_fetch_array('SELECT * FROM `applications` WHERE `id` = ' . $id) I get an error: mysql_fetch_array(): supplied argument is not a valid MySQL result resource Link to comment https://forums.phpfreaks.com/topic/59374-solved-mysql-varible-select-from-help/ Share on other sites More sharing options...
JasonLewis Posted July 11, 2007 Share Posted July 11, 2007 to run the mysql_fetch_array you need a mysql resource. to get this you must first run a query: mysql_fetch_array('SELECT * FROM `applications` WHERE `id` = ' . $id) should be: $query = mysql_qurey("SELECT * FROM `applications` WHERE `id`='{$id}'"); $array = mysql_fetch_array($query); hope it helps. Link to comment https://forums.phpfreaks.com/topic/59374-solved-mysql-varible-select-from-help/#findComment-294961 Share on other sites More sharing options...
maxudaskin Posted July 11, 2007 Author Share Posted July 11, 2007 to run the mysql_fetch_array you need a mysql resource. to get this you must first run a query: mysql_fetch_array('SELECT * FROM `applications` WHERE `id` = ' . $id) should be: $query = mysql_qurey("SELECT * FROM `applications` WHERE `id`='{$id}'"); $array = mysql_fetch_array($query); hope it helps. Thanks!! Link to comment https://forums.phpfreaks.com/topic/59374-solved-mysql-varible-select-from-help/#findComment-294971 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.