note 68137 deleted from function.mysql-fetch-array by nlopess

From: Date: Fri, 14 Jul 2006 17:10:13 +0000
Subject: note 68137 deleted from function.mysql-fetch-array by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-114784@lists.php.net to get a copy of this message
Note Submitter: set ---- What is wrong? <?php $link = mysql_connect('localhost', 'vhost1133s0', 'ling6h') or die('Ühenduse loomine andmebaasiga ebaõnnestus : ' . mysql_error()); mysql_select_db('vhost1133s0') or die('Andmebaasi määramine ebaõnnestus : ' . mysql_error()); $sql = 'SELECT * FROM tonu_pildid ORDER BY ´id´ DESC'; $result = mysql_query($sql); echo '<table>'; while ( $data = mysql_fetch_array($result) ) { echo '<tr><td>' . $data[0] . '</td><td>' . $data[1] . '</td></tr>' . "\n"; } echo '</table>'; ?> I get this error message: Warning: mysql_fetch_array(): supplied argument is not a validw MySQL result resource in .../index.php on line 11

« previous php.notes (#114784) next »