No, the only time you need a semicolon within the query string is if you are
multiple commands.

ie $query="Set @count=0; Select name,@count=@count+1 as count from people";

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company

----- Original Message -----
From: "Vera Algoet" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Cecily Walker Kidd" <[EMAIL PROTECTED]>
Sent: Monday, September 17, 2001 12:10 PM
Subject: [PHP-DB] Re: NEWBIE - Needs Assistance with Joins

> Cecily,
> I'm sure you probably heard from others about your parse error. I know
> it looks weird, but you need to have two semicolons, so instead of:
> > $CDList =mysql_query(
> > "SELECT artist_name, album_title ".
> > "FROM artists, album_titles WHERE artist_id = aid");
> you would have
> $CDList =mysql_query(
> "SELECT artist_name, album_title ".
> "FROM artists, album_titles WHERE artist_id = aid;");
> (Note the semicolon after "aid"). This is because the first one is to
> complete the SQL statement, while the one after the parenthisis is to
> complete the PHP statement.
> Vera
> -------------------------------------------------------------------
> Madness takes its toll. Please have exact change.
> Vera Algoet, Web Developer
> Monterey County Office of Education
> 831-784-4169

PHP Database Mailing List (
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