Hi,
for TEXT you don't specify a length.
TINYTEXT
A BLOB or TEXT column with a maximum length of 255 (2^8 - 1) characters.
TEXT
A BLOB or TEXT column with a maximum length of 65535 (2^16 - 1) characters.
MEDIUMTEXT
A BLOB or TEXT column with a maximum length of 16777215 (2^24 - 1)
characters.
LONGTEXT
A BLOB or TEXT column with a maximum length of 4294967295 (2^32 - 1)
characters.
If the problem still occurs, output the whole query and post it.
Johannes
""r.gelstharp"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9bmks1$7re$[EMAIL PROTECTED]">news:9bmks1$7re$[EMAIL PROTECTED]...
> I think I'm a little too close to the problem to see it properly, but
> there's something wrong with my SQL syntax in this query I'm trying to
> create.
>
> Readers of Julie Meroni's PHP Essentials will recognise it.
>
> <?php
> $sql = "CREATE TABLE $table_name (";
>
> for ($i = 0; $i < count($field_name); $i++)
> {
> $sql .= "$field_name[$i] $field_type[$i]";
>
> if ($field_length[$i] != "")
> {
> $sql .= " ($field_length[$i]),";
> }//end if
> else
> {
> $sql .= ",";
> }//end else
> }//end for
>
> $sql = substr($sql, 0, -1);
>
> $sql .= ");";
>
> It gives me this error
>
> You have an error in your SQL syntax near '(50),product_price float
> (10),product_category text (50),product_picture text (5' at line 1
>
> Is there like an upper limit on the number of characters you can have in a
> SQL statement?
>
> All help is greatly appreciated!
>
>
>
> --
> PHP Windows 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]
>
--
PHP Windows 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]