Re: syntax question
| From: | Ernest E Vogelsinger | Date: | Wed, 19 Feb 2003 17:14:15 +0000 |
| Subject: | Re: syntax question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-136213@lists.php.net to get a copy of this message | ||
At 18:06 19.02.2003, Anthony Ritter spoke out and said:
--------------------[snip]--------------------
>The question:
>
>Is the reasoning that a comma *must* be added since this is _within_ a loop?
>
>As in:
>CREATE TABLE chairs (
>id INT(5),
>item VARCHAR(50),
>desc TEXT ,
>price FLOAT , // common should be deleted but there is no way of knowing
--------------------[snip]--------------------
No. The reason for the comma is that SQL dictates that column names in a
create table statement are separated by a comma.
This is valid SQL:
create table chairs(
id int(5),
item varchar(50),
desc text,
price float
);
This is invalid and generates an SQL error when passed to the server:
create table chairs(
id int(5)
item varchar(50)
desc text
price float
);
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/