Jump to content


MySQL and PHP problem

  • This topic is locked This topic is locked
1 reply to this topic

#1 trillion

  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 16 September 2006 - 07:35 AM

I am able to connect to the database then later in the script

I have this code:

define('SQL_PREFIX', $_POST['username']);

$calsql4 = "
`id` int(11) NOT NULL

$query4 = mysql_query($calsql4, $link);

$result = mysql_query($query4) or die('Query failed: ' . mysql_error());

and when I run the script I get this error:

Query failed: Query was empty

The strange thing is that i works on my local server but not on my remote server.
There is a difference in versions:

local = 4.1.13a
remote = 4.0.18

Both PHP versions are the same. Why will this code work on my local server and not remotely? What is making the query read as empty?

#2 wildteen88

  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 16 September 2006 - 09:18 AM

Thread close. Please do not post multiple instances of threads around the forum.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users