note 66414 rejected from function.mysqli-fetch-array by philip
| From: | philip@php.net | Date: | Sun, 21 May 2006 21:38:25 +0000 |
| Subject: | note 66414 rejected from function.mysqli-fetch-array by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-111794@lists.php.net to get a copy of this message | ||
Note Submitter: Le4rner at gmail dot com
----
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.