MySQL Forums
Forum List  »  Newbie

Re: Order by two columns
Posted by: Gaby Lopez
Date: October 31, 2014 01:40AM

Perfect!
CREATE TABLE `comments` (
`id_comment` int(10) unsigned NOT NULL AUTO_INCREMENT,
`id_parent` int(10) unsigned NOT NULL DEFAULT '0',
`comment_text` varchar(255) NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`moderator_id` int(10) unsigned NOT NULL,
`new_id` int(10) unsigned NOT NULL,
`is_visible` tinyint(1) NOT NULL DEFAULT '0',
`is_censored` tinyint(1) NOT NULL DEFAULT '0',
`comment_date` datetime NOT NULL,
`comm_like` int(10) unsigned NOT NULL,
`comm_unlike` int(10) unsigned NOT NULL,
PRIMARY KEY (`id_comment`)
) ENGINE=MyISAM AUTO_INCREMENT=25 DEFAULT CHARSET=utf8

CREATE TABLE `news` (
`id_new` int(10) unsigned NOT NULL AUTO_INCREMENT,
`new_is_published` tinyint(1) NOT NULL DEFAULT '0',
`nav_id` int(10) unsigned NOT NULL,
`sub_nav_id` int(10) unsigned NOT NULL,
`id_journalist` int(10) unsigned NOT NULL,
`pre_title` varchar(64) NOT NULL,
`new_title_home` varchar(64) NOT NULL,
`new_intro_home` varchar(255) NOT NULL,
`new_url` varchar(64) NOT NULL,
`new_title` varchar(128) NOT NULL,
`new_intro` varchar(255) NOT NULL,
`new_text` text NOT NULL,
`allow_comments` tinyint(1) NOT NULL DEFAULT '0',
`new_date` datetime NOT NULL,
`new_read` int(10) unsigned NOT NULL,
`new_shared` int(10) unsigned NOT NULL,
`new_is_urgent` tinyint(1) NOT NULL DEFAULT '0',
`new_is_highlight` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_new`)
) ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=utf8

Options: ReplyQuote


Subject
Written By
Posted
October 30, 2014 11:21AM
October 30, 2014 12:29PM
October 30, 2014 12:45PM
October 30, 2014 12:59PM
October 30, 2014 01:41PM
October 30, 2014 09:22PM
Re: Order by two columns
October 31, 2014 01:40AM
October 31, 2014 04:26AM
October 31, 2014 08:24AM
October 31, 2014 11:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.