For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > March 2005 > RE: [PHP-DB] What wrong with my Query??









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PHP-DB] What wrong with my Query??
Joćo Coelho

2005-03-25, 3:55 pm

lastip value should be quoted lastip=3D'123.123.123.123'

-----Mensagem original-----
De: HarryG [mailto:harry1980@gmail.com]=20
Enviada: sexta-feira, 25 de Mar=E7o de 2005 5:27
Para: php-db@lists.php.net
Assunto: [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;
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com