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,
Quick DB Question
Moderator: General Moderators
-
sailingaway
- Forum Newbie
- Posts: 2
- Joined: Mon Sep 09, 2002 3:59 pm
- Location: GA
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
*
something like...
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
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"
}
?>