Re: Urgent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try this

*select * from tbl_media where status ='A' order by status desc*

On Fri, May 8, 2009 at 1:28 PM, Brian Etheridge <Brian.Etheridge@xxxxxxxxxxx
> wrote:

>
>
> Not sure I understand what you are trying to do. Start by specifying an
> 'ORDER BY' clause in your SQL:
>
> select * from tbl_media order by status
>
> select * from tbl_media order by status desc
>
> One of those should do what you want.
>
> ________________________________
>
> From: php-objects@xxxxxxxxxxxxxxx <php-objects%40yahoogroups.com> [mailto:
> php-objects@xxxxxxxxxxxxxxx <php-objects%40yahoogroups.com>]
> On Behalf Of gopi nath
> Sent: 08 May 2009 08:53
> To: php groups
> Subject:  Urgent
>
>
> my table is
> tbl_media (tablename)
> id_media,name,photo,status.(table fileds)
>
> i displayed the table. show the records..
>
> $s = "select * from tbl_media";
> $q = mysql_query($s);
> while($r = mysql_fetch_array){
> echo $r['name'];
> }
> status value A -Active , I-Inactive
> i need the table fist display the status value 'A' after status value
> ''IA; how to fix that?
> for example first four records Status =A and remaining are Status=I
>
> Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo!
> Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox
> <http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox>
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>  
>



-- 
Thanks & Regards,


M.RAMESH(B.Tech)
jr Software Engineer
ID: NGH32077
Ph : +91 9391663520
Home page : www.nannacomputers.com
An ISO 9001:2000 company.

(This e-mail contains information from Nanna Computers, which may be
privileged or confidential. The information is for the intended
individual(s) or entity named above. If you are not the intended recipient
be aware that any copying, disclosing, distribution or use of the above
email and/or its attachments is prohibited and is illegal. If you have
received this electronic message in error, please notify us by telephone or
email (to the numbers or address above) immediately. This e-mail is not
un-solicited e-mail under the relevant regulations)


[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux