Newbie back for more

From: Date: Thu, 19 Apr 2001 12:21:53 +0000
Subject: Newbie back for more
Groups: php.windows 
Request: Send a blank email to php-windows+get-6866@lists.php.net to get a copy of this message
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!

« previous php.windows (#6866) next »