How to pull the first occurrence out of a database
Moderator: General Moderators
-
tonykasdorf
- Forum Newbie
- Posts: 6
- Joined: Wed Mar 31, 2010 7:13 am
How to pull the first occurrence out of a database
I'm creating a query into my database. The query returns 5 rows but I would like to output the data from the first row only. What mysql function could I use that will allow my to output data from the first row?
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: How to pull the first occurrence out of a database
[text]LIMIT 1[/text]
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.