Kaip šitą kodą perdaryti į SQL:
$inf_newtable[1] = DB_AJAX_POLL." (
poll_id smallint(5) unsigned NOT NULL AUTO_INCREMENT,
poll_title varchar(200) NOT NULL DEFAULT '',
poll_opt_0 varchar(200) NOT NULL DEFAULT '',
poll_opt_1 varchar(200) NOT NULL DEFAULT '',
poll_opt_2 varchar(200) NOT NULL DEFAULT '',
poll_opt_3 varchar(200) NOT NULL DEFAULT '',
poll_opt_4 varchar(200) NOT NULL DEFAULT '',
poll_opt_5 varchar(200) NOT NULL DEFAULT '',
poll_opt_6 varchar(200) NOT NULL DEFAULT '',
poll_opt_7 varchar(200) NOT NULL DEFAULT '',
poll_opt_8 varchar(200) NOT NULL DEFAULT '',
poll_opt_9 varchar(200) NOT NULL DEFAULT '',
poll_votes_0 smallint(5) unsigned DEFAULT '0',
poll_votes_1 smallint(5) unsigned DEFAULT '0',
poll_votes_2 smallint(5) unsigned DEFAULT '0',
poll_votes_3 smallint(5) unsigned DEFAULT '0',
poll_votes_4 smallint(5) unsigned DEFAULT '0',
poll_votes_5 smallint(5) unsigned DEFAULT '0',
poll_votes_6 smallint(5) unsigned DEFAULT '0',
poll_votes_7 smallint(5) unsigned DEFAULT '0',
poll_votes_8 smallint(5) unsigned DEFAULT '0',
poll_votes_9 smallint(5) unsigned DEFAULT '0',
poll_ips text NOT NULL,
poll_started int(10) unsigned NOT NULL DEFAULT '0',
poll_ended int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (poll_id)
) TYPE=MyISAM;";
Reikia kad sukurtų lentelę ajax_poll
nes amn PHP sukurimas neveikia, reikia per PHPMADMIN kurti lentelęs.
|
CREATE TABLE TAVOPREFIX_ajax_poll (
poll_id smallint(5) unsigned NOT NULL AUTO_INCREMENT,
poll_title varchar(200) NOT NULL DEFAULT '',
poll_opt_0 varchar(200) NOT NULL DEFAULT '',
poll_opt_1 varchar(200) NOT NULL DEFAULT '',
poll_opt_2 varchar(200) NOT NULL DEFAULT '',
poll_opt_3 varchar(200) NOT NULL DEFAULT '',
poll_opt_4 varchar(200) NOT NULL DEFAULT '',
poll_opt_5 varchar(200) NOT NULL DEFAULT '',
poll_opt_6 varchar(200) NOT NULL DEFAULT '',
poll_opt_7 varchar(200) NOT NULL DEFAULT '',
poll_opt_8 varchar(200) NOT NULL DEFAULT '',
poll_opt_9 varchar(200) NOT NULL DEFAULT '',
poll_votes_0 smallint(5) unsigned DEFAULT '0',
poll_votes_1 smallint(5) unsigned DEFAULT '0',
poll_votes_2 smallint(5) unsigned DEFAULT '0',
poll_votes_3 smallint(5) unsigned DEFAULT '0',
poll_votes_4 smallint(5) unsigned DEFAULT '0',
poll_votes_5 smallint(5) unsigned DEFAULT '0',
poll_votes_6 smallint(5) unsigned DEFAULT '0',
poll_votes_7 smallint(5) unsigned DEFAULT '0',
poll_votes_8 smallint(5) unsigned DEFAULT '0',
poll_votes_9 smallint(5) unsigned DEFAULT '0',
poll_ips text NOT NULL,
poll_started int(10) unsigned NOT NULL DEFAULT '0',
poll_ended int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (poll_id)
) TYPE=MyISAM;";
tavo proxy irasyk ir pabandyk gal veiks
|