Multiple Pages from one php document
From: Neil Trigger (email_at_magic2k.com)
Date: 12/17/03
- Next message: J.O. Aho: "Re: Fetching a field as an array MySQL"
- Previous message: Craig Keightley: "Sorting Arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 17 Dec 2003 10:11:38 -0800
Hiya,
I'm trying to work out how to query a database in MySQL, get a nuumber of
listings that match some of the criteria. For example the database has a
"town" field. If the town field matches the form's town field (as input from
the user), that listing's "Title" field is printed.
This title should act as a link to the full information of the listing. EG.
The user enters "Plymouth" as the town,
The php sends a query to the database
The database says "yes we have 10 listings in plymouth" and lists the titles
of all 10 as links.
The user clicks on one of the titles named "Neil's House"
The php then sends a query to the database and prints all the details of
this listing including "Description" and "Directions" fields.
I hope that makes sense, but anyone have any ideas HOW to do it?
I have a feeling I'll need to add includes or if / else statements to only
print the whole listing if the database is certain it has the listing
required, but otherwise keep giving details until only one is listed.
Also is it possible to create an SQL database from an Excell spreadsheet?
Thanks.
-- ¿ Trigger ? http://www.magic2k.com/ http://www.oddmap.co.uk
- Next message: J.O. Aho: "Re: Fetching a field as an array MySQL"
- Previous message: Craig Keightley: "Sorting Arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|