wintercounter Posted July 7, 2007 Share Posted July 7, 2007 CREATE TABLE IF NOT EXISTS `".$this->ipsclass->DB->obj['sql_tbl_prefix']."ibspeak_messages` ( `id` bigint(20) NOT NULL auto_increment, `mid` mediumint( NOT NULL default '0', `date` int(10) NOT NULL default '0', `message` text NOT NULL, PRIMARY KEY (`id`) ) ;"; } if($this->alterTables) { $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."groups` ADD `g_ibspeak_usesystem` tinyint(1) NOT NULL default '0'"; $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."groups` ADD `g_ibspeak_canview` tinyint(1) NOT NULL default '0'"; $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."groups` ADD `g_ibspeak_canshout` tinyint(1) NOT NULL default '0'"; $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."groups` ADD `g_ibspeak_caneditown` tinyint(1) NOT NULL default '0'"; $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."groups` ADD `g_ibspeak_canedit` tinyint(1) NOT NULL default '0'"; $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."groups` ADD `g_ibspeak_candeleteown` tinyint(1) NOT NULL default '0'"; $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."groups` ADD `g_ibspeak_candelete` tinyint(1) NOT NULL default '0'"; $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."groups` ADD `g_ibspeak_canviewhistory` tinyint(1) NOT NULL default '0'"; $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."groups` ADD `g_ibspeak_postsmilies` tinyint(1) NOT NULL default '0'"; $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."groups` ADD `g_ibspeak_postbbcode` tinyint(1) NOT NULL default '0'"; $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."groups` ADD `g_ibspeak_posthtml` tinyint(1) NOT NULL default '0'"; $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."groups` ADD `g_ibspeak_noflood` tinyint(1) NOT NULL default '0'"; $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."members` ADD `ibspeak_isbanned` tinyint(1) NOT NULL default '0'"; $q[] = "ALTER TABLE `".$this->ipsclass->DB->obj['sql_tbl_prefix']."groups` ADD `g_ibspeak_canban` tinyint(1) NOT NULL default '0'"; } return $q; Hi! Can anyone translate me this php script to mysql script, that i can import into my database. The prefix is: ibf Thank you very much! Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 7, 2007 Share Posted July 7, 2007 Just replace `".$this->ipsclass->DB->obj['sql_tbl_prefix']." with ibf_ then just copy the strings defined within double quotes (for example: $q[] = "COPY WHAT IS HERE"; ). Basically just drop everything that is PHP related when you have done that you're left with the SQL query which should be ready to be queried into MySQL. There you go: CREATE TABLE IF NOT EXISTS `ibf_ibspeak_messages` ( `id` bigint(20) NOT NULL auto_increment, `mid` mediumint( NOT NULL default '0', `date` int(10) NOT NULL default '0', `message` text NOT NULL, PRIMARY KEY (`id`) ); ALTER TABLE `ibf_groups` ADD `g_ibspeak_usesystem` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_canview` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_canshout` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_caneditown` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_canedit` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_candeleteown` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_candelete` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_canviewhistory` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_postsmilies` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_postbbcode` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_posthtml` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_noflood` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_members` ADD `ibspeak_isbanned` tinyint(1) NOT NULL default '0'; ALTER TABLE `ibf_groups` ADD `g_ibspeak_canban` tinyint(1) NOT NULL default '0'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.