kur varētu,būt šeit viana,ka nejeit pilvertīgi šis sql? Un vai,ka'ds to varētu izlabot? 

 

Paldies jau iepriekš par cenšhanos palidzēt wink_mini.gif

<?php
mysql_query("
CREATE TABLE `online_guests` (
`id` int(11) NOT NULL auto_increment,
`ip` varchar(25) collate utf8_bin NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());
mysql_query("
CREATE TABLE `web_activity` (
`id` int(5) NOT NULL auto_increment,
`who_id` int(5) NOT NULL,
`where_id` int(5) NOT NULL,
`type` varchar(25) collate utf8_bin NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());
mysql_query("
CREATE TABLE `web_banners` (
`id` int(5) NOT NULL auto_increment,
`img` varchar(500) collate utf8_bin NOT NULL,
`url` varchar(500) collate utf8_bin NOT NULL,
`type` varchar(6) collate utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());

mysql_query("
CREATE TABLE `web_comments` (
`id` int(11) NOT NULL auto_increment,
`time` int(11) NOT NULL,
`where` varchar(25) collate utf8_bin NOT NULL,
`type` varchar(25) collate utf8_bin NOT NULL,
`text` varchar(500) collate utf8_bin NOT NULL,
`user_id` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());

mysql_query("
CREATE TABLE `web_files` (
`id` int(5) NOT NULL auto_increment,
`title` varchar(25) collate utf8_bin NOT NULL,
`desc` varchar(500) collate utf8_bin NOT NULL,
`url` varchar(500) collate utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());
mysql_query("
CREATE TABLE `web_forum_answers` (
`aid` int(5) NOT NULL auto_increment,
`tid` int(5) NOT NULL,
`user_id` int(5) NOT NULL,
`time` int(11) NOT NULL,
`text` varchar(5000) collate utf8_bin NOT NULL,
PRIMARY KEY (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());
mysql_query("
CREATE TABLE `web_forum_cats` (
`cat_id` int(5) NOT NULL auto_increment,
`title` varchar(25) collate utf8_bin NOT NULL,
PRIMARY KEY (`cat_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());
mysql_query("
CREATE TABLE `web_forum_forums` (
`fid` int(5) NOT NULL auto_increment,
`title` varchar(50) collate utf8_bin NOT NULL,
`desc` varchar(100) collate utf8_bin NOT NULL,
`catid` int(5) NOT NULL,
PRIMARY KEY (`fid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());
mysql_query("
CREATE TABLE `web_forum_topic_read` (
`id` int(5) NOT NULL auto_increment,
`user_id` int(5) NOT NULL,
`last_read` int(11) NOT NULL,
`fid` int(5) NOT NULL,
`topic` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());

mysql_query("
CREATE TABLE `web_forum_topics` (
`tid` int(5) NOT NULL auto_increment,
`title` varchar(50) character set utf8 collate utf8_latvian_ci NOT NULL,
`desc` varchar(250) character set utf8 collate utf8_latvian_ci NOT NULL,
`starter_id` int(5) NOT NULL,
`last_id` int(5) NOT NULL,
`time` int(11) NOT NULL,
`last_time` int(11) NOT NULL,
`pinned` int(1) NOT NULL default '0',
`closed` int(1) NOT NULL default '0',
`fid` int(5) NOT NULL,
PRIMARY KEY (`tid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());
mysql_query("
CREATE TABLE `web_gallery` (
`id` int(5) NOT NULL auto_increment,
`views` int(5) NOT NULL default '0',
`pic` varchar(250) collate utf8_bin NOT NULL,
`title` varchar(25) collate utf8_bin NOT NULL,
`time` int(11) NOT NULL,
`user_id` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());
mysql_query("
CREATE TABLE `web_groups` (
`id` int(5) NOT NULL auto_increment,
`name` varchar(25) collate utf8_bin NOT NULL,
`prefix` varchar(50) collate utf8_bin NOT NULL,
`suffix` varchar(50) collate utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());
mysql_query("
CREATE TABLE `web_news` (
`id` int(11) NOT NULL auto_increment,
`user_id` int(5) NOT NULL,
`title` varchar(25) collate utf8_bin NOT NULL,
`text` varchar(5000) collate utf8_bin NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());
mysql_query("
CREATE TABLE `web_shoutbox` (
`id` int(5) NOT NULL auto_increment,
`time` int(11) NOT NULL,
`user_id` int(5) NOT NULL,
`text` varchar(500) collate utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());
mysql_query("
CREATE TABLE `web_sms` (
`id` int(5) NOT NULL auto_increment,
`sender` varchar(25) collate utf8_bin NOT NULL,
`amount` varchar(25) collate utf8_bin NOT NULL,
`cuid` varchar(500) collate utf8_bin NOT NULL,
`payment_id` varchar(500) collate utf8_bin NOT NULL,
`country` varchar(25) collate utf8_bin NOT NULL,
`status` varchar(25) collate utf8_bin NOT NULL,
`share` varchar(25) collate utf8_bin NOT NULL,
`statuss` int(1) NOT NULL default '0',
`user_id` int(5) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());
mysql_query("
CREATE TABLE `web_users` (
`user_id` int(5) NOT NULL auto_increment,
`username` varchar(25) character set utf8 collate utf8_latvian_ci NOT NULL,
`email` varchar(250) collate utf8_bin NOT NULL,
`password` varchar(250) collate utf8_bin NOT NULL,
`reg_date` int(11) NOT NULL,
`pid` int(5) NOT NULL,
`ip` varchar(25) collate utf8_bin NOT NULL,
`country` varchar(50) collate utf8_bin NOT NULL,
`last_seen` int(11) NOT NULL default '0',
`skype` varchar(25) collate utf8_bin NOT NULL default ' ',
`avatar` varchar(500) collate utf8_bin NOT NULL default 'images/avatars/no_avatar.png',
`signature` varchar(250) collate utf8_bin NOT NULL default ' ',
`show_status` int(1) NOT NULL default '0',
`group` int(1) NOT NULL default '1',
`credits` int(9) NOT NULL default '0',
`warn` int(3) NOT NULL default '0',
`login_key` varchar(500) collate utf8_bin NOT NULL default '0',
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());
mysql_query("
CREATE TABLE `web_videos` (
`id` int(11) NOT NULL auto_increment,
`type` varchar(25) collate utf8_bin NOT NULL,
`user_id` varchar(25) collate utf8_bin NOT NULL,
`vid` varchar(500) collate utf8_bin NOT NULL,
`time` int(11) NOT NULL,
`views` int(5) NOT NULL default '0',
`title` varchar(25) collate utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
")or die(mysql_error());

mysql_query("
INSERT INTO `web_groups` VALUES (1, 'Lietotajs', '', '');
")or die(mysql_error());
mysql_query("
INSERT INTO `web_groups` VALUES (2, 'Administrators', '<b><font color=''blue''>', '</font></b>');
")or die(mysql_error());
mysql_query("
INSERT INTO `web_groups` VALUES (3, 'Moderators', '<b><font color=''green''>', '</font></b>');
")or die(mysql_error());
mysql_query("
INSERT INTO `web_groups` VALUES (4, 'Main Admins', '<b><font color=''red''>', '</font></b>');
")or die(mysql_error());
?>

 

Laboja , labots 1x