php - Sort a table based on a value present in a specific column -



php - Sort a table based on a value present in a specific column -

i have table testimonials, named 'testimonials_manager' , there column nowadays named 'testimonials_image' storing testimonial image path , name.

i want show testimonial list , list sort based on image value means testimonial show first contain image , not contain image showing in last.

is possible sort table based on value nowadays in specific column? please help me.

my table construction :

create table if not exists `testimonials_manager` ( `testimonials_id` int(11) not null auto_increment, `language_id` int(11) not null default '0', `testimonials_title` varchar(64) collate utf8_unicode_ci not null default '', `testimonials_url` varchar(255) collate utf8_unicode_ci default null, `testimonials_name` text collate utf8_unicode_ci not null, `testimonials_image` varchar(254) collate utf8_unicode_ci not null default '', `testimonials_html_text` text collate utf8_unicode_ci, `testimonials_mail` text collate utf8_unicode_ci not null, `testimonials_company` varchar(255) collate utf8_unicode_ci default null, `testimonials_city` varchar(255) collate utf8_unicode_ci default null, `testimonials_country` varchar(255) collate utf8_unicode_ci default null, `testimonials_show_email` char(1) collate utf8_unicode_ci default '0', `sidebox` int(1) not null default '0', `status` int(1) not null default '0', `date_added` datetime not null default '0000-00-00 00:00:00', `testimonial_add` date not null, `last_update` datetime default null, `testimonial_products` varchar(300) collate utf8_unicode_ci not null default '0', `testimonial_categories` varchar(300) collate utf8_unicode_ci not null default '0', primary key (`testimonials_id`) ) engine=myisam default charset=utf8 collate=utf8_unicode_ci ;

suppose, have 50 testimonial inserted tables in 30 testimonial has contain image , rest 20 testimonials has no image. want show first 30 testimonials contain image in testimonial listing page , after show 20 testimonials has no image. think understand saying?

i :

select * testimonials_manager order testimonials_image

php mysql sql

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -