----- Original Message -----
From: Darryl Friesen <[EMAIL PROTECTED]>
To: boclair <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 1:22 AM
Subject: Re: [PHP-DB] Select where


> > Thanks, I only gave the mySQL but the php scripting is
> >
> > $deceased = mysql_query(SELECT * FROM members where
> > status=\'deceased\'");
> >                  and later
> > while ($myrow = mysql_fetch_row($deceased))
> >
> > MySQL now says in relation to the *while* line
> > Warning: Supplied argument is not a valid MySQL result resource
>
> Yikes!  I hope those are typos, and that you didn't cut and paste
that query
> from your script.  If you did, then it needs some work.  Try:
>
> $deceased = mysql_query("SELECT * FROM members where
status='deceased'");
>
> You need the leading double quote before SELECT, and you don't need
to
> escape the single quotes.

 It's always the simple things.  I had the leading " but had escaped
the ' around deceased.
No excuse but too many lines of printf for a table with styling.
Started to escape everything.

Many, many thanks

Tim Morris



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to