note 68137 added to function.mysql-fetch-array

From: Date: Fri, 14 Jul 2006 17:04:39 +0000
Subject: note 68137 added to function.mysql-fetch-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-114782@lists.php.net to get a copy of this message
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 ---- Server IP: 212.47.220.13 Probable Submitter: 213.35.171.25 ---- X-Spam-Status: No, hits=3.3 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-array.php Edit -- http://master.php.net/note/edit/68137 Del: integrated -- http://master.php.net/note/delete/68137/integrated Del: useless -- http://master.php.net/note/delete/68137/useless Del: bad code -- http://master.php.net/note/delete/68137/bad+code Del: spam -- http://master.php.net/note/delete/68137/spam Del: non-english -- http://master.php.net/note/delete/68137/non-english Del: in docs -- http://master.php.net/note/delete/68137/in+docs Del: other reasons-- http://master.php.net/note/delete/68137 Reject -- http://master.php.net/note/reject/68137 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#114782) next »