note 68576 added to function.mysql-fetch-array

From: Date: Wed, 02 Aug 2006 11:33:52 +0000
Subject: note 68576 added to function.mysql-fetch-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-115444@lists.php.net to get a copy of this message
$kysely = "SELECT elokuva_id FROM elokuva"; /*executing the query:*/ $tulos = mysql_query($kysely) or die ('Query failed: '.mysql_error()); /*fetching an array from result into a table*/ $idtaulu = mysql_fetch_row($tulos); /*getting the highest value from table* echo max($idtaulu); ...but it doesn't work! The right max-value in my table should be 6, but this code gives me 1. What is the problem? ---- Server IP: 80.81.171.181 Probable Submitter: 83.100.32.166 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-array.php Edit -- https://master.php.net/note/edit/68576 Del: integrated -- https://master.php.net/note/delete/68576/integrated Del: useless -- https://master.php.net/note/delete/68576/useless Del: bad code -- https://master.php.net/note/delete/68576/bad+code Del: spam -- https://master.php.net/note/delete/68576/spam Del: non-english -- https://master.php.net/note/delete/68576/non-english Del: in docs -- https://master.php.net/note/delete/68576/in+docs Del: other reasons-- https://master.php.net/note/delete/68576 Reject -- https://master.php.net/note/reject/68576 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#115444) next »