note 111075 added to function.mysql-fetch-row

From: Date: Fri, 11 Jan 2013 19:27:38 +0000
Subject: note 111075 added to function.mysql-fetch-row
Groups: php.notes 
Request: Send a blank email to php-notes+get-192942@lists.php.net to get a copy of this message
Hey guys, i'm getting this error when ever I try to run the code below! Please help! It's an emergency! ERROR: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/u967246295/public_html/admin.php on line 121 CODE: <?php $con = mysql_connect("mysql.serversfree.com","u967246295_root","anandrao"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("test", $con); $result = mysql_query("SELECT * FROM reg"); if (!$result) { echo 'Could not run query: '; } $row = mysql_fetch_row($result); echo $row[0]; echo $row[1]; ?> ---- Server IP: 69.147.83.199 Probable Submitter: 49.137.91.127 ---- Manual Page -- http://php.net/manual/en/function.mysql-fetch-row.php Edit -- https://master.php.net/note/edit/111075 Del: integrated -- https://master.php.net/note/delete/111075/integrated Del: useless -- https://master.php.net/note/delete/111075/useless Del: bad code -- https://master.php.net/note/delete/111075/bad+code Del: spam -- https://master.php.net/note/delete/111075/spam Del: non-english -- https://master.php.net/note/delete/111075/non-english Del: in docs -- https://master.php.net/note/delete/111075/in+docs Del: other reasons-- https://master.php.net/note/delete/111075 Reject -- https://master.php.net/note/reject/111075 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#192942) next »