Page 1 of 1

Quick DB Question

Posted: Mon Sep 09, 2002 4:00 pm
by sailingaway
I am new to MySQL and PHP so be kind!

If I have a MySQL DB and I want to search that DB using certain criteria such as Last Name and I want all those records to be returned on one "results page" and each result be a link to the entire record, what is that called and how do I do it. For example, If I search my DB for a last name of Jones and it returns 5 Jones' how can I make each result a link to the respective records? Any help would be appreciated.

Thanks,

Posted: Mon Sep 09, 2002 5:18 pm
by Coco
http://www.mysql.com/doc/en/SELECT.html

enjoy...

try asking google for a beginners guide to sql :)
or go to the library/buy one (thats what i did)

*edits in a little more detail....*
*edits out retardedness :oops:*
something like...

Code: Select all

<?php
$result = mysql_query("SELECT * FROM Table WHERE Lname = Jones SORT BY Fname");
while ($row = mysql_fetch_array($result)){
     echo "stuff from $row"
}

?>