PDA

View Full Version : recordset tutorial


bs1bs1
09-17-2009, 04:56 AM
Hi. I am learning about recordsets. What I have set up is a registration page and then another page that shows some of the details via a recordset.
The recordset uses a sql query that joins two tables. So it falls into an 'advanced' DW recordset query.
What I am trying to find out how to do now is at the top of the page that shows the recordset results have a text field where the user can enter a 'country' and hit submit that then filters the records and only shows those records with that country name.

Ideally what I would like is to have the same country name dropdown list used on the registration form be the list of countries for the filter field.

I have googled many sites and tutorials, but all deal with the one table filter option. Can't find anything that shows how to set up a filter once it moves to the 'advance' part. ( I can't write sql, but can usually work what a sql statement does once it is written)

Any pointers to tutorials or info would be great :-D

edbr
09-17-2009, 05:11 AM
for tuts try tizag, if you have a join the tables will be accessed as 1 table so $recordset['country'] for example
the filter would need a condition perhaps like 'where $recordset['country'] == $_POST['country']'
field names changed to protect the innocent of course :)

bs1bs1
09-20-2009, 10:15 PM
Thanks for tip and the pointer to the tuts. :-D