Hi All,
For some reason i am getting errors, in this code and the error i am getting is:
Alter Submissions Date Failed
and nothing will install to the database till i fix this for some reason :queasy: :queasy:
$sql = "CREATE TABLE IF NOT EXISTS `".$prefix."_submissions_submissions` (
`submission_id` int(11) NOT NULL auto_increment,
`submiter` int(11) NOT NULL default '0',
`submission_name` text NOT NULL,
`submission_age` text NOT NULL,
`submission_site` text NOT NULL,
`submission_sitedes` text NOT NULL,
`submission_themedes` text NOT NULL,
`submission_type` text NOT NULL,
`submission_extras` text NOT NULL,
`submission_IP` varchar(30) NOT NULL default '',
`submission_date` int(11) NOT NULL default '0',
`submission_read` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`submission_id`))";
$result = $db->sql_query($sql);
if ($result) echo '<font class="title">Submissions Table Installed Sucessfully</font>';
else echo $sql;
echo '<br><BR>';
$sql = "CREATE TABLE IF NOT EXISTS `".$prefix."_submissions_config` (
`send_to_admin` tinyint(1) NOT NULL default '0',
`admin_email` varchar(100) NOT NULL default '',
`admin_subject` varchar(255) NOT NULL default '',
`admin_message` text NOT NULL,
`send_to_user` tinyint(1) NOT NULL default '0',
`confirm_subject` varchar(255) NOT NULL default '',
`confirm_message` text NOT NULL)";
$result = $db->sql_query($sql);
if ($result) echo '<font class="title">Configuration Table Installed Sucessfully</font>';
else echo $sql;
echo '<br><BR>';
$sql = "INSERT INTO `".$prefix."_submissions_config` VALUES (0, 'admin@mail.com', 'Somebody has posted a Submission', 'Somebody has posted a Submission', 0, 'Your Submission posted', 'Thank you for your submission.')";
$result = $db->sql_query($sql);
if ($result) echo '<font class="title">Data to Configuration Table Inserted Sucessfully</font>';
else echo $sql;
echo '<br><BR><br><BR>';
$sql = "ALTER TABLE `".$prefix."_submissions_submissions` ADD `submission_email` VARCHAR( 100 ) NOT NULL AFTER `submiter`";
$result = $db->sql_query($sql);
if ($result) echo '<font class="title">Alter Submissions Date Sucessfuly</font>';
else echo '<font class="title">Alter Submissions Date Failed</font>';
echo '<br><BR><br><BR>';
$sql = "CREATE TABLE IF NOT EXISTS `".$prefix."_submissions_replies` (
`reply_id` int(11) NOT NULL auto_increment,
`submission` int(11) NOT NULL default '0',
`reply_text` text NOT NULL,
`reply_IP` varchar(30) NOT NULL default '',
`reply_date` int(11) NOT NULL default '0',
PRIMARY KEY (`reply_id`))";
$result = $db->sql_query($sql);
if ($result) echo '<font class="title">Replies Table Installed Sucessfully</font>';
else echo $sql;
echo '<br><BR>';
echo '<center><font class="title" color="red">Delete install.php file!!!</font></center>';
Thanks