Re: pulling records from mysql

From: Date: Thu, 25 Jul 2002 15:31:31 +0000
Subject: Re: pulling records from mysql
Groups: php.general 
Request: Send a blank email to php-general+get-109515@lists.php.net to get a copy of this message
You would need to use SQL to identify which columns and rows you need to retrieve, then use various MySQL PHP functions to gather the information. For your two queries, they would appear thus, respectively: SELECT firstname FROM tablename WHERE id=16 and SELECT firstname FROM tablename ORDER BY id ASC LIMIT 15 The functions you'll want to look into are mysql_connect(), mysql_select_db(), mysql_query() and mysql_fetch_array(). They can be found at http://www..php.net, do a search for any one of the functions ;o) HTH Martin >>> "Tyler Durdin" <linuxgeek23@hotmail.com> 07/25/02 11:18AM >>> I have a column in my table named firstname with twenty records in it. How can i use php to pull out individual records (say for ex. record 16)? Also, how could i pull out all records upto number 15? Thanks in advance. _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#109515) next »