Jump to content

[SOLVED] Query runs in phpMyAdmin but not in program


rkstevens

Recommended Posts

I have the following code:

	$showtypequery	=	"SELECT * FROM ShowType WHERE StypeID	=	'$u_showtype'";
$showtypedata	=	mysql_query($showquery);
if (!$showtypedata)				// connection failed; show error and exit
{
	echo ("Show type query error:".$u_showtype."<br />".$showtypequery."<br />\n");
	include('sources/dberror.php');
}

When $u_showtype = 1, $showtypequery = "SELECT * FROM ShowType WHERE StypeID = '1'

 

When I run this query under phpMyAdmin, it executes perfectly. When I execute it within the program, I get the error, which is "Query Is Empty". It should return 1 record.

 

What am I doing wrong?

 

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.