Re: [PHP-DB] What wrong with my Query??

2005-03-26 Thread GR Kumaran
There you have to consider the following things; 1, the query is mixed with INSERT and UPDATE staments 2, `id` is a numeric data type field, so the value should be mentioned in numeric form (instead of string) 3, LIMIT is a keyword of SQL statement 4, `lastip` field is a string datatype, so the

RE: [PHP-DB] What wrong with my Query??

2005-03-25 Thread dpgirago
Harry, I think you could also just use backticks around `limit` as occurs in the table creation statement below. David limit is a mysql keyword...change that field name and the corresonding names in your sql bastien From: HarryG [EMAIL PROTECTED] To: php-db@lists.php.net Subject:

RE: [PHP-DB] What wrong with my Query??

2005-03-25 Thread João Coelho
lastip value should be quoted lastip='123.123.123.123' -Mensagem original- De: HarryG [mailto:[EMAIL PROTECTED] Enviada: sexta-feira, 25 de Março 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

RE: [PHP-DB] What wrong with my Query??

2005-03-25 Thread Gary Every
Actually, your sql syntax is wrong. The SET keyword if for UPDATE not INSERT Use $sql = INSERT INTO mfadmin (id,account,planlimit,name,email,password,lastlogin,datecreated,expiry,l astip) VALUES ('','$accname_lc','$plans','$yourname','$email','$password','$datetoday'

RE: [PHP-DB] What wrong with my Query??

2005-03-25 Thread dpgirago
Either syntax is correct. From section 6.4.3 of the MySQL Manual: INSERT [LOW_PRIORITY | DELAYED] [IGNORE] [INTO] tbl_name [(col_name,...)] VALUES ((expression | DEFAULT),...),(...),... [ ON DUPLICATE KEY UPDATE col_name=expression, ... ] or INSERT [LOW_PRIORITY |

Re: [PHP-DB] What wrong with my Query??

2005-03-24 Thread HarryG
thanks. Stupid me. I've been banging by head for the last two hours. Bastien Koert [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] limit is a mysql keyword...change that field name and the corresonding names in your sql bastien From: HarryG [EMAIL PROTECTED] To: