MySQL Forums
Forum List  »  InnoDB

mistak i don`t know where it?
Posted by: mohamed abdo
Date: March 25, 2008 11:12AM

its y code

<html>
<body>
<?php
require_once( "../sor/config.php" );
$sql = "CREATE TABLE atsilar
(
astid int NOT NULL AUTO_INCREMENT ,
PRIMARY KEY(astid) ,
name varchar(20) NOT NULL default '',
email varchar(30) NOT NULL default '',
desc varchar(50) NOT NULL default '',
time varchar(20) NOT NULL default ''
)ENGINE=MyISAM DEFAULT CHARSET=cp1256";

if (mysql_query($sql,$con))
{
echo "Database created";
}
else
{
echo "Error creating database: " . mysql_error();
}
mysql_close($con);
?>
</body>
</html>



apear this mistake

Error creating database: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc varchar(50) NOT NULL default '', time varchar(20) NOT NULL default '' )EN' at line 7

Options: ReplyQuote


Subject
Views
Written By
Posted
mistak i don`t know where it?
2123
March 25, 2008 11:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.