How to fetch only 1st row of tabel without implementing loop?

From: Date: Fri, 12 Oct 2001 04:02:31 +0000
Subject: 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-70873@lists.php.net to get a copy of this message
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

« previous php.general (#70873) next »