I seem to be having a bit of a problem with sql_query in a PHP script I'm working on (will be an accounts area for people who have purchased my plugins..so they can login and gt the most upto date version available).
I am using;
$result = mysql_query($getmessage);
if (!$result) {
$error = mysql_error();
error("Unable to get details on email account stuff...Reason: $error (code run: $getmessage)", $connection);
}
The query that comes out, is;
INSERT INTO `Accounts` (`Name`,`Email`,`Password`,`MyFaves`) VALUES ('Andrew','andy.newby@ace-installer.com','0.014feEse0.01','1')
But for some reaoson I get an error saying;
The most weird part of it, is the fact that it will run the printed out SQL query fine via MySQLMan....which makes me come to the conclusion its something to do with the way I'm running it.
Any ideas?
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
I am using;
Code:
$getmessage = "INSERT INTO `Accounts` (`Name`,`Email`,`Password`,`$item_name`) VALUES ('$first_name','$payer_email','$password','1'"; $result = mysql_query($getmessage);
if (!$result) {
$error = mysql_error();
error("Unable to get details on email account stuff...Reason: $error (code run: $getmessage)", $connection);
}
The query that comes out, is;
INSERT INTO `Accounts` (`Name`,`Email`,`Password`,`MyFaves`) VALUES ('Andrew','andy.newby@ace-installer.com','0.014feEse0.01','1')
But for some reaoson I get an error saying;
Quote:
You have an error in your SQL syntax near '' at line 1The most weird part of it, is the fact that it will run the printed out SQL query fine via MySQLMan....which makes me come to the conclusion its something to do with the way I'm running it.
Any ideas?
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!