rastaman46 Posted January 29, 2012 Share Posted January 29, 2012 Hello im geting this error what im ding wrong? PHP Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /home/admincom/public_html/tsue/library/plugins/movie_plugin.php on line 7 line 7 is: while ($row = mysqli_fetch_array($sql)) { code here: $query = mysqli_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB); $sql = mysqli_query($query, "SELECT `membername`, `filename`, `tid`, `info_hash`, `name`, `description`, `cid`, `size`, `added`, `leechers`, `seeders`, `times_completed`, `owner`, `options`, `nfo`, `sticky`, `flags`, `mtime`, `ctime`, `download_multiplier`, `upload_multiplier` FROM `tsue_members`, `tsue_torrents`, `tsue_attachments` WHERE `memberid`='owner' AND `content_type`='torrent_images' AND `content_id` = `tid` LIMIT 0, 10"); while ($row = mysqli_fetch_array($sql)) { $movie_plugin_row = ''; $uploader = $row['membername']; $description= $row['description']; $dydis= $row['size']; $name= $row['name']; $leechers= $row['leechers']; $owner= $row['owner']; $filename= $row['filename']; $nunx= $row['tid']; $seeders= $row['seeders']; eval("\$movie_plugin_row = \"".$TSUE['TSUE_Template']->LoadTemplate('movie_plugin_row')."\";"); $movie_plugin .= $movie_plugin_row; } Link to comment https://forums.phpfreaks.com/topic/256010-mysqli_fetch_array-expects-parameter-1-hellp/ Share on other sites More sharing options...
Pikachu2000 Posted January 29, 2012 Share Posted January 29, 2012 Your query is failing and returning a boolean value of FALSE to mysqli_fetch_array(); You should check for query success or failure, and on failure use mysqli_error to see why it failed. Link to comment https://forums.phpfreaks.com/topic/256010-mysqli_fetch_array-expects-parameter-1-hellp/#findComment-1312362 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.