Jump to content

[SOLVED] mysql


40esp

Recommended Posts

 

$conn = mysql_connect("localhost",'dbname','dbpass');
$db = mysql_select_db("dbname", $conn);

$sql = "select * from table";
$result = mysql_query($sql, $conn);

while ($list = mysql_fetch_assoc($result)) {
   foreach ($list as $key => $val) {
      echo "$key : $val <br />";
   }
   echo "<br />";   
}

Link to comment
https://forums.phpfreaks.com/topic/107868-solved-mysql/#findComment-552933
Share on other sites

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.