|
Posted by Angelos on 11/09/76 11:18
That is another piece of code :
************************************************
<?
ini_set('error_reporting', E_ALL);
ini_set("display_errors","1"); ?>
<?
require_once ('../../Connections/willans.php');
$create = 'CREATE DATABASE IF NOT EXISTS gamoto';
$results = mysql_query($create) or die (mysql_error());
mysql_select_db("gamoto");
$sql = '
DROP TABLE IF EXISTS cms_access_levels ;
CREATE TABLE IF NOT EXISTS cms_access_levels (
access_lvl int(10) unsigned NOT NULL auto_increment,
access_lvl_name varchar(45) NOT NULL ,
PRIMARY KEY ( access_lvl , access_lvl_name )
) TYPE=MyISAM;
';
$results = mysql_query($sql) or die (mysql_error());
if ($results)
echo "DB Created";
?>
******************************************************
And that is the Error :
##############################
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 '; CREATE TABLE
IF NOT EXISTS cms_access_levels ( access_lv
##############################
For some reason it doesn't display the whole error ... but anyway that is
not the problem.
How am I going to make the $sql RUN ???
Navigation:
[Reply to this message]
|