Jump to content

mysqli_fetch_array() expects parameter 1 [Hellp]


rastaman46

Recommended Posts

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;
}

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.