note 66414 added to function.mysqli-fetch-array

From: Date: Sun, 21 May 2006 20:07:14 +0000
Subject: note 66414 added to function.mysqli-fetch-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-111792@lists.php.net to get a copy of this message
9 $dbh = mysqli_connect("localhost", $member_db_user, $member_psswd, $member_db); 11 $sql_str = "SELECT * FROM $database WHERE owner = '$user_id'"; 12 $dg = mysqli_query($dbh, $sql_str); 13 $prior_video = $dg->num_rows; 14 if($prior_video >= 1){ 15 WHILE($dg2 = mysqli_fetch_array($dg, MYSQLI_ASSOC)){ //lines 16 through 20 just declaing variables 21 } 22 } Gives me Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /ide/home/my_site/path/here/file.php5 on line 15 I also tryed OOP style and got the same thing. Now I understand $dg is a boolean value, but isn't it also my mysqli_result? I have hundreds of scripts and they all work fine, this on however... I am sure it is my fault somewhere, but any help would be welcomed. ---- Server IP: 216.194.113.175 Probable Submitter: 68.50.115.20 ---- 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.mysqli-fetch-array.php Edit -- http://master.php.net/note/edit/66414 Del: integrated -- http://master.php.net/note/delete/66414/integrated Del: useless -- http://master.php.net/note/delete/66414/useless Del: bad code -- http://master.php.net/note/delete/66414/bad+code Del: spam -- http://master.php.net/note/delete/66414/spam Del: non-english -- http://master.php.net/note/delete/66414/non-english Del: in docs -- http://master.php.net/note/delete/66414/in+docs Del: other reasons-- http://master.php.net/note/delete/66414 Reject -- http://master.php.net/note/reject/66414 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#111792) next »