In article <034501c2052b$0b8abed0$0100a8c0@JohnH>, [EMAIL PROTECTED] says... > Hi, > > I know how to use limit to pull 2 or more records out of a database. > > What I wish to do is only pull one record from a database. > > I am using the following query: > $query = "select * from news limit LIMIT $id, ++id"; > > I get all sorts of parse errors and stuff. > > Please Help. > > Also is there a function to return only one record? > > JJ Harrison > www.tececo.com > [EMAIL PROTECTED] >
$query = "select * from news LIMIT 1"; and if you want a particular order you need to add ORDER BY (ASC or DESC) depending on your exact need. -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php