mysql-php question re: clickable listed fields
Posted: Tue Jun 25, 2002 3:26 pm
I hope I explain this well enough. I can access my Mysql database and get a list of record_id fields as in below in a list:
...
$sql = "SELECT record_id, name ... etc.
FROM $table_name
";
$result = @mysql_query($sql,$connection) or die("Couldn't execute query.");
$member_list = "<ul>";
while ($row = mysql_fetch_array($result)) {
$record_id = $row['org_id'];
... etc.
$member_list .= "<li><a href=\"members.php\">$record_id</a>";
}
$member_list .= "</ul>";
etc.
Perhaps I didn't copy this right but suffice it to say I can list the records_id fields in all the records. Can I get this list so that the id fields that appear are clickable to reveal the content of each record and its fields? In other words, so one would be able to click on one name on the list and get the fields listed for that record? I can list all the information in one record with php and mysql but with my code I seem to get only the last record in the database. Let me know if this here makes sense or not and you want to help. I can send my code.
Al
...
$sql = "SELECT record_id, name ... etc.
FROM $table_name
";
$result = @mysql_query($sql,$connection) or die("Couldn't execute query.");
$member_list = "<ul>";
while ($row = mysql_fetch_array($result)) {
$record_id = $row['org_id'];
... etc.
$member_list .= "<li><a href=\"members.php\">$record_id</a>";
}
$member_list .= "</ul>";
etc.
Perhaps I didn't copy this right but suffice it to say I can list the records_id fields in all the records. Can I get this list so that the id fields that appear are clickable to reveal the content of each record and its fields? In other words, so one would be able to click on one name on the list and get the fields listed for that record? I can list all the information in one record with php and mysql but with my code I seem to get only the last record in the database. Let me know if this here makes sense or not and you want to help. I can send my code.
Al