Jump to content

MySQL Searching


EdoDodo

Recommended Posts

Use www.php.net/mysql_fetch_assoc IE:

 

<?php
// db connection above

$sql = "SELECT * FROM table_name LIMIT 1";
$row = mysql_fetch_array(mysql_query($sql));

foreach ($row as $colname => $val) {
      $columns .= $colname . "<br />"; 
}
?>

 

That would work.

 

There is also a nice function http://us2.php.net/manual/en/function.mysql-list-fields.php    that should list the fields.

Link to comment
https://forums.phpfreaks.com/topic/57423-mysql-searching/#findComment-284100
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.