faqts : Computers : Programming : Languages : PHP : Function Libraries : PHP Related

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

Entry

How to load data from my phpMyAdmin Databse

Oct 9th, 2006 09:55
Matthew Wilkinson, Naz Khan, http://php.net/mysql


If you are using PHPMyAdmin, you need the MySQL functions. You would
usually use them in this order:
mysql_connect('server', 'username', 'password');
mysql_select_db('database');
$result = mysql_query('SELECT * FROM table');
$n = 1;
while ($n <= mysql_num_rows($result))
{
list ($col1, $col2, $col3) = mysql_fetch_row($result);
//do something with data
$n++;
}