Jump to content

sql phpmyadmin help


NSW42

Recommended Posts

Hey Guys,

 

im not sure if im doing it right or wrong, but will take the last as being wrong, I have an existing db, but now I have made some changes, I need to update the db for extra tables, ive been trying to do it thru query, I get no errors when I do it, but for some reason it doesnt add the extras, the data base just keeps the current, will paste below what im tryng to add, thats thats the original db with extras in it if im wrong or someones knows exactly how to go about this, any help is appreciated..

 

Thanks

 

 

CREATE TABLE IF NOT EXISTS `freedom_users` (

  `id` int(11) NOT NULL auto_increment,

  `token` varchar(64) NOT NULL default '',

  `last_load` int(32) NOT NULL default '0',

  `act_history` longtext NOT NULL,

  `last_login` int(32) NOT NULL default '0',

  `username` varchar(32) NOT NULL default '',

  `password` varchar(64) NOT NULL default '',

  `email` varchar(100) NOT NULL default '',

  `email_verified` tinyint(1) NOT NULL default '0',

  `city` varchar(64) NOT NULL default '',

  `state` varchar(64) NOT NULL default '',

  `country` varchar(64) NOT NULL default '',

  `zipcode` varchar(32) NOT NULL default '',

  `latitude` float NOT NULL default '0',

  `longitude` float NOT NULL default '0',

  `timezone` varchar(32) NOT NULL default '',

  `birthdate` varchar(32) NOT NULL default '',

  `astrologic_sign` varchar(32) NOT NULL default '',

  `horoscope` longtext NOT NULL,

  `horoscope_date` int(64) NOT NULL default '0',

  `age` int(3) NOT NULL default '0',

  `gender` varchar(32) NOT NULL default '',

  `language` varchar(100) NOT NULL default '',

  `use_theme` varchar(250) NOT NULL default '',

  `description` longtext NOT NULL,

  `quote` longtext NOT NULL,

  `header` varchar(75) NOT NULL,

  `mood` varchar(15) NOT NULL,

  `imood` varchar(3) NOT NULL,

  `statusm` varchar(250) NOT NULL,

  `status` varchar(250) NOT NULL,

  `Occupation` varchar(250) NOT NULL,

  `Orientation` varchar(250) NOT NULL,

  `Smoker` varchar(250) NOT NULL,

  `Drinker` varchar(250) NOT NULL,

  `Children` varchar(250) NOT NULL,

  `notepad_body` longtext NOT NULL,

  `views` int(10) NOT NULL default '0',

  `profile_data` longtext NOT NULL,

  `mailboxes` longtext NOT NULL,

  `pictures` longtext NOT NULL,

  `mainpicture` varchar(100) NOT NULL default '',

  `contacts` longtext NOT NULL,

  `relationship_requests` longtext NOT NULL,

  `block` longtext NOT NULL,

  `profile_views` longtext NOT NULL,

  `profile_votes` longtext NOT NULL,

  `pictures_votes` longtext NOT NULL,

  `favorites` longtext NOT NULL,

  `nudges` longtext NOT NULL,

  `settings` longtext NOT NULL,

  `spam_reports` longtext NOT NULL,

  `abuse_reports` longtext NOT NULL,

  `account_type` int(32) NOT NULL default '0',

  `account_expire` int(64) NOT NULL default '0',

  `registration_date` int(64) NOT NULL default '0',

  `registration_reference` varchar(250) NOT NULL default '',

  `active` tinyint(1) NOT NULL default '0',

  `disable_until` int(64) NOT NULL default '0',

  `is_moderator` tinyint(1) NOT NULL default '0',

  `is_administrator` tinyint(1) NOT NULL default '0',

  `is_superadministrator` tinyint(1) NOT NULL default '0',

  `isbroken` int(32) default '0',

  `day` varchar(32) NOT NULL default '',

  `month` varchar(32) NOT NULL default '',

  `reported` varchar(32) NOT NULL default '',

  UNIQUE KEY `id` (`id`),

  FULLTEXT KEY `username` (`username`,`city`,`state`,`country`,`zipcode`,`gender`,`quote`,`header`,`profile_data`)

);

Link to comment
https://forums.phpfreaks.com/topic/116790-sql-phpmyadmin-help/
Share on other sites

If you're trying to overwrite the old table with the same name with this new table structure, drop the 'if not exists'.  Please note that you'll loose all your records!  If you're trying to edit the table structure and keep your records, http://dev.mysql.com/doc/refman/5.0/en/alter-table.html is a better option.

Link to comment
https://forums.phpfreaks.com/topic/116790-sql-phpmyadmin-help/#findComment-600627
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.