Ok ora il messaggio di errore non c'é più!
Adesso però mi dice questo e non capisco se devo modificare il tipo di db cioé INNODB metterlo in MIYSAM:
Errore che mi da:
The used table type doesn't support FULLTEXT indexes
Codice PHP:
<?php require_once "connection/conn.php" ;?>
<?php
$sql = "CREATE TABLE IF NOT EXISTS cms_access_levels (
access_lvl tinyint(4) NOT NULL auto_increment,
access_name varchar(50) NOT NULL default '',
PRIMARY KEY (access_lvl)
)
";
$result = mysql_query($sql) or die (mysql_error());
// Creo la tabella privilegi
$sql = "INSERT IGNORE INTO cms_access_levels " .
"VALUES (1, 'User'), " .
"(2, 'Moderator'), " .
"(3, 'Administrator')";
$result = mysql_query($sql) or die (mysql_error());
// Creo la tabella articoli
$sql = "CREATE TABLE IF NOT EXISTS cms_articles (
article_id int(11) NOT NULL auto_increment,
author_id int(11) NOT NULL default '0',
is_published tinyint(1) NOT NULL default '0',
date_submitted datetime NOT NULL default '0000-00-00 00:00:00',
date_published datetime NOT NULL default '0000-00-00 00:00:00',
title varchar(255) NOT NULL default '',
body mediumtext NOT NULL,
PRIMARY KEY (article_id),
KEY IdxArticle (author_id,date_submitted),
[COLOR=sienna]FULLTEXT KEY IdxText (title,body)[/COLOR] // Qui mi da errore cosa posso fare?
)
";
$result = mysql_query($sql) or die (mysql_error());
// Creo la tabella commenti
$sql = "CREATE TABLE IF NOT EXISTS cms_comments (
comment_id int(11) NOT NULL auto_increment,
article_id int(11) NOT NULL default '0',
comment_date datetime NOT NULL default '0000-00-00 00:00:00',
comment_user int(11) NOT NULL default '0',
comment_text NOT NULL,
PRIMARY KEY (comment_id),
KEY IdxComment (article_id)
)
";
$result = mysql_query($sql) or die (mysql_error());
// Creao la tabella utenti
$sql = "CREATE TABLE IF NOT EXISTS cms_users (
user_id int(11) NOT NULL auto_increment,
email varchar(255) NOT NULL default '',
passwd varchar(50) NOT NULL default '',
name varchar(100) NOT NULL default '',
access_lvl tinyint(4) NOT NULL default '1',
PRIMARY KEY (user_id),
UNIQUE KEY uniq_email (email)
)
";
$result = mysql_query($sql) or die (mysql_error());
$adminemail = "michel@netcore.ch";
$adminpass = "1234";
$adminname = "Admin";
$sql = "INSERT IGNORE INTO cms_users " .
"VALUES (NULL, '$adminemail', '$adminpass', '$adminname', 3)";
$result = mysql_query($sql) or die (mysql_error());
echo "<html><head><title>CMS Tables Created</title></head><body>";
echo "CMS Tables created. Here is your initial login information:\n";
echo "<ul>[*][b]login[/b]: " . $adminemail . "\n";
echo "[*][b]password[/b]: " . $adminpass . "[/list]\n";
echo "<a href=\"login.php\">Login</a> to the site now.";
echo "</body></html>"
?>