Re: Select record by ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2007-01-28 at 21:12 -0500, Craige Leeder wrote:
> As someone else already stated, my best guess according to that error
> is that $user_id has a null, or inappropriate value. The error occurs
> at the last character of the query, so it has to be something like
> hat. Echo the query and let us know what it outputs.

This is coding 101, echo your output and don't presume you know what
you're doing. My wager is that there's a 100% chance he has a null or
empty string value in the variable. A two second echo would have
presented the problem immediately. Given that he probably doesn't have a
clue what's in the variable, it's probably registered via register
globals or pulled directly from $_GET or $_POST and he's asking for
trouble by not escaping it.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux