RE: [PHP] How to fetch only 1st row of tabel without implementing loop?
| From: | Manisha | Date: | Fri, 12 Oct 2001 04:53:09 +0000 |
| Subject: | RE: [PHP] How to fetch only 1st row of tabel without implementing loop? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70878@lists.php.net to get a copy of this message | ||
Thanks jessie,
manisha
At 12:36 PM 10/12/01 -0700, power jessie wrote:
SELECT * FROM newsmast LIMIT 1 is that what you mean?? jessie :) -----Original Message----- From: Manisha [mailto:manisha@aurica.com] Sent: Thursday, October 11, 2001 9:03 PM To: php-general@lists.php.net Subject: [PHP] How to fetch only 1st row of tabel without implementing loop? I want to fetch only first row with sql statement given to mySQL. 'select * from newsmast' gives me more than 1 records, but I want to display only first row fetched. I know with loop and specifying condition in a loop I can do that. But I want to know, is there anything which I can specify in sql statement itself ? like maxrow = 1 or equivalent ?, so there won't be any need of loop ? manisha -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net