Sorry, let me clearify.. unless UserId is an integer, quote it !!

jason

On Sat, 24 Jul 2004 12:03:54 -0700, Jason Davidson
<[EMAIL PROTECTED]> wrote:
> whats in UserId var.. any spaces or nonword chars.. if so, quote it.
> 
> Jason
> 
> 
> 
> On Sat, 24 Jul 2004 19:49:04 +0100, Harlequin
> <[EMAIL PROTECTED]> wrote:
> > I've been working on a query to retrieve a user's data based on their UserID
> > that is stored in a variable "$_SESSION['logname']" which underneath I
> > convert using: $UserID = $_SESSION['logname'];
> >
> > But when I execute a SELECT query:
> >
> > $CaptureDetails = "SELECT * FROM RegisteredMembers
> >    WHERE UserID = $UserID";
> >
> > I get:
> >
> > Unknown column 'Admin' in 'where clause'
> >
> > I've tried everything I can think of. any suggestions...?
> >
> > --
> > -----------------------------
> >  Michael Mason
> >  Arras People
> >  www.arraspeople.co.uk
> > -----------------------------
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>

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

Reply via email to