[thelist] creating a mySQL table dynamically in php
Hans-Fr=?ISO-8859-1?B?6WTp?=ric Fraser
hfraser at videotron.ca
Mon Jan 6 15:14:12 CST 2003
On 1/6/03 4:02 PM, "Tom Dell'Aringa" <pixelmech at yahoo.com> wrote:
> $sql = " CREATE TABLE test (";
> $sql .= " pid VARCHAR(12), ";
> $sql .= " qty VARCHAR(12), ";
> $sql .= " ); ";
>
> if(!@mysql_query($sql))
> {
> print "Err" . mysql_error();
> exit();
> }
set your last line to:
$sql .= " );";
a little tip : do not feed white spaces after the semicolon in your queries
... you will always get errors!
hans!
More information about the thelist
mailing list