For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > November 2004 > Re: [PHP-DB] Problem with script









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] Problem with script
Robby Russell

2004-11-02, 3:55 pm

On Tue, 2004-11-02 at 10:41 -0600, renato.linux@desertcomputers.com
wrote:
> Query failed: 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
> 't read card','1099413551')' at line 1


My initial guess is that you do not have magic quotes on.

You might want to validate your data before inserting it into the
database.

Try: http://us2.php.net/manual/en/functi...cape-string.php

Any instances of "'" will break your INSERT query the way you have
it..so you need to insert them all with ' (which escapes the single
quotes)

hth,

Robby

--
/***************************************
* Robby Russell | Owner.Developer.G
* PLANET ARGON | www.planetargon.com
* Portland, OR | robby@planetargon.com
* 503.351.4730 | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
* --- Now supporting PHP5 ---
****************************************
/

Sponsored Links







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

Copyright 2008 codecomments.com