how to create a table in mysql in php code.....in redhat
Posted: Wed Jan 23, 2008 8:22 am
its sayin syntax error................key missing.........can u help me
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
$sql = 'CREATE TABLE `product` (
`pid` INT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR( 100 ) NOT NULL,
PRIMARY KEY ( `pid` )
)';
mysql_query( $sql);
?>