Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

RE: [PHP-DB] What wrong with my Query??
Actually, your sql syntax is wrong. The SET keyword if for UPDATE not
INSERT=20

Use=20
$sql =3D "INSERT INTO mfadmin
 (id,account,planlimit,name,email,passwor
d,lastlogin,datecreated,expiry,l
astip) VALUES
 ('','$accname_lc','$plans','$yourname','
$email','$password','$datetoday'
,'$datetoday','$expirydate','123.123.123.123')";


Gary Every
Sr. UNIX Administrator
Ingram Entertainment Inc.
2 Ingram Blvd, La Vergne, TN 37089
"Pay It Forward!"


-----Original Message-----
From: HarryG [mailto:harry1980@gmail.com]=20
Sent: Thursday, March 24, 2005 11:27 PM
To: php-db@lists.php.net
Subject: [PHP-DB] What wrong with my Query??


What the hell is wrong with this MYSQL query?? PHP keeps giving me the
error message:

You have an error in your SQL syntax. Check the manual that corresponds
to your MySQL server version for the right syntax to use near
'limit=3D20000, name=3D'test1', email=3D'atest@test.com', password=3D't=20

$query =3D "INSERT INTO mfadmin SET id=3D'', account=3D'$accname_lc',
limit=3D$plans, name=3D'$yourname', email=3D'$email', =
password=3D'$password',
lastlogin=3D'$datetoday', datecreated=3D'$datetoday', =
expiry=3D'$expirydate',
lastip=3D123.123.123.123";
=20
This is my table structure
CREATE TABLE `admin` (
`id` int(10) unsigned NOT NULL auto_increment,
`account` varchar(50) NOT NULL default '',
`limit` int(10) unsigned NOT NULL default '0',
`name` varchar(50) NOT NULL default '',
`email` varchar(50) NOT NULL default '',
`password` varchar(50) NOT NULL default '',
`lastlogin` varchar(50) NOT NULL default '',
`datecreated` varchar(50) NOT NULL default '',
`expiry` varchar(50) NOT NULL default '',
`lastip` varchar(50) NOT NULL default '',
PRIMARY KEY  (`id`)
) TYPE=3DMyISAM;

Report this thread to moderator Post Follow-up to this message
Old Post
Gary Every
03-26-05 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP DB archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:55 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.