Re: SQL Quick problem

From: Date: Sat, 02 Dec 2000 23:39:02 +0000
Subject: Re: SQL Quick problem
References: 1 2 3 4  Groups: php.db 
Request: Send a blank email to php-db+get-4966@lists.php.net to get a copy of this message
Thanks for the explanation!!! Best regards, Fábio Ottolini ----- Original Message ----- From: "Scott Barron" <sb125499@ohiou.edu> To: <php-db@lists.php.net> Sent: Saturday, December 02, 2000 9:25 PM Subject: Re: [PHP-DB] SQL Quick problem > On Sat, Dec 02, 2000 at 09:12:15PM -0200, FXbio Ottolini wrote: > > The parentheses in this case is something related to my personal style. > > Working with double quotes works fine. What I believe that is wrong is that > > there is no ";" after the name of the table (clubs). As far as I know each > > and every MySQL statement must end with a ";", right? Ok, there are some > > excpetions. But in this casa it is mandatory to use the ";" at the end of > > the sentence. This tells MySQL to execute the statement. So if we forget > > about the parentheses the PHP should look like this: > > > > $query = "SELECT name, city FROM clubs;"; > > > > Please correct if I am wrong. > > > > Best regards, > > > > Fábio Ottolini > > > > > > The ending semicolon is not required when using PHP or the C API or really > anything other than mysql's interactive interpreter. The semicolon is a way > for the interactive interpreter to know that you are finished entering your > query and that it should process it. This makes no sense when using it from > a programming language because your entire query is given in the function > call. The problem, as stated earlier, is somewhere else, not the semicolon. > Further code will have to be given to determine where. > > -Scott

« previous php.db (#4966) next »