Hello, Im trying to select only one row in a mysql database (in this case a poll with the smallest pollID)........... Each row has a field called "pollID" which is the primary key and is auto incremented when a new row is inserted.
I could possible do the following but I think its a bit extensive: $query = "SELECT * FROM polls ORDER BY pollID ASC"; $result = mysql_query($query); for ($count = 0; $count < 1 $count++) { $data = mysql_fetch_array($result); $pollID = $data['pollID']; } $query = "SELECT * FROM polls WHERE pollID = $pollID"; Does anyone now a solution for this that requires less code? Thx -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php