Mustang Evolution Forum banner

1 - 4 of 4 Posts

·
Banned
Joined
·
11,872 Posts
Discussion Starter #1
Ok for some reason I am getting these errors while in vbulletins debug mode (using the EXPLAIN on the queries):

Code:
Warning: mysql_fetch_field(): supplied argument is not a valid MySQL result resource in /home/exforum/public_html/includes/class_database_explain.php on line 94

Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in /home/exforum/public_html/includes/class_database_explain.php on line 99
The code and the query that doesn't run (getting all the lyrics information.)
PHP:
// Let's Do A Barrel Roll and Get The Requested Lyrics Page
if ($_GET['do'] == 'view')
{
	$vbulletin->input->clean_array_gpc('l', array(
		'l' => TYPE_UINT,
	));
	
	$l = $vbulletin->GPC['l'];

	if($l == '')
	{
		eval (standard_error( fetch_error('fieldmissing')));
	}

	// Where are getting the Lyrics Information Here
	$data = $db->query_first("
				SELECT 
				vblyrics_songs.*,
				vblyrics_artists.artist 
				FROM " . TABLE_PREFIX . "vblyrics_artists AS vblyrics_artists
				LEFT JOIN " . TABLE_PREFIX . "vblyrics_songs AS vblyrics_songs 
				ON vblyrics_artists.artistid = vblyrics_songs.artistid
				WHERE songid = $l 
				LIMIT 1
	");

	if (!$data)
	{
		eval (standard_error( fetch_error('fieldmissing')));
	}

	$data[date] = vbdate($vbulletin->options['dateformat'], $data[dateadded],true);
	$data[date] .= ' ' . vbdate($vbulletin->options['timeformat'], $data[dateadded]);

	$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); 

	$data['songlyrics']  = $parser->do_parse($data['songlyrics'] ,'0',$vbulletin->options['allowsmilies'],'1','1','1','0');

	$vbulletin->input->clean_gpc('c', COOKIE_PREFIX . 'vBLyrics_view', TYPE_STR);
	$lyrics_last_viewed = unserialize(convert_bbarray_cookie($vbulletin->GPC[COOKIE_PREFIX . 'vBLyrics_view']));	
	$new_cookie = 0;
	if( $lyrics_last_viewed[$l] == '')
	{
		$new_cookie = 1;
	}
	if(  intval($lyrics_last_viewed[$g]) + 86400 < TIMENOW || $new_cookie == 1)
	{
		$db->query_write("
				UPDATE " . TABLE_PREFIX . "vblyrics_songs 
				SET views = views + 1 where songid = $l");
		set_bbarray_cookie('vBLyrics_view', $l, TIMENOW);
	}

	eval('print_output("' . fetch_template('vblyrics_viewlyrics') . '");');

}
It's pissing me off.

The url I am using to bring the page up:
http://www.exposethemusic.net/lyrics/index.php?do=view&l=12

This should bring up a page with lyrics to Blink182's All The Small Things but all it does is bring up the error page telling me I am missing a field. :wtf2:

Any ideas?
 

·
15.3 Second V8 Killer Yo
Joined
·
7,212 Posts
And this would be why I hate trying to integrate **** with vBulletin.

When I get some time and if it isn't answered...I will take a look at it.
 
1 - 4 of 4 Posts
Top