Re: Filtering Data
| From: | Ross Honniball | Date: | Thu, 30 Jun 2005 12:17:17 +0000 |
| Subject: | Re: Filtering Data | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-39822@lists.php.net to get a copy of this message | ||
Sounds like you just want some pretty basic variable substitution? As in the page is submitted with, say, state=T and you need to code your select statement like eg:
$query = "SELECT * FROM tbl WHERE state = '".$_REQUEST['state']."'";
then execute this query in your DB call.
Does that help?
kc68@cornell.edu wrote:
How do I write a link which results in a page with part of the data in the mysql table and do that multiple times on a single php script page? That is, I want to be able to click on state names on a single page and bring up a page with only that state's data. I understand use of the "where" limitation, but I don't see how to code a line which will override the base "select" statement for the script. Thanks. Ken