View Full Version : recordset tutorial

09-17-2009, 03: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

09-17-2009, 04: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 :)

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