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
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
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
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

