Jump to content

How to get info from MySQL


PHPrev

Recommended Posts

Get what from MySQL? To get data from a MySQL table just use a standard SELECT Query

 

// send a query to MySQL
$sql = 'SELECT * FROM your_table';
$result = mysql_query($sql);

// get results
while($row = mysql_fetch_assoc($result))
{
     echo '<pre>'.print_r($row, true).'</pre>';
}

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.