You are here: Re: Mysql Query « PHP Programming Language « IT news, forums, messages
Re: Mysql Query

Posted by Berimor on 11/02/05 14:27

On Wed, 02 Nov 2005 14:23:51 +0200, Berimor <roman@roman.roman> wrote:

> On Wed, 02 Nov 2005 12:50:10 +0200, Zeeshan <zeeshan359@gmail.com> wrote:
>
>> Hi everybody,
>>
>> How can I get rownum using MySQL queries ,
>> In Oracle one can you in this way SELECT rownum as srno, fname FROM
>
> $sql=mysql_querry(SELECT COUNT(*) FROM table_name WHERE condition);

sorry $sql=mysql_query("SELECT COUNT(*) FROM table_name WHERE
condition"); :)

> $res=mysql_fetch_row($sql);
> $numofrows=$res[0];
>
>
>> tablename
>> suppose If there are 45 records and if i use while for the
>>
>> srno should display 1, 2, 3, ... 45
>>
>> query like SELECT rownum as srno, fname FROM tablename
>>
>> I dont want to use php counter, i want it from query
>>
>> Reagrds
>> Friend
>>
>
>
>



--
---
Exact Meta Search | Major Search Engine
http://exactsearcher.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация