Jump to content

PHP Filtering?


scott_yamahata@hotmail.co

Recommended Posts

Not sure if this is a PHP issue or a MySQL one.Think this is a simple solution.In terms of my browse.php, I understand that I'm pulling information based on:<FORM name=browse action="browse.php" method=GET><SELECT NAME="id"> 

 

I also know that the id information is what's bringing back categories like "Architects" and "Carpentry." 

 

<OPTION VALUE="107">Architects</OPTION>  <OPTION VALUE="94">Carpentry</OPTION>

For example, this brings back all of the information under "Architects" and "Carpentry."Is there any way to refine the data even further?Say, for example, I wanted all of the work from "Architects" to be from a specific city?Thanks if anyone can help out.--Scott

 

 

 

      <FORM name=browse action="browse.php" method=GET>

           

        <INPUT type=HIDDEN name="">

            <FONT FACE=Tahoma,Verdana,Arial

                  SIZE=1

                  COLOR=#666666>Browse </FONT>

            <SELECT NAME="id">

  <OPTION VALUE="0"></OPTION>

  <OPTION VALUE="107">Architects</OPTION>

 

  <OPTION VALUE="94">Carpentry</OPTION>[/][/]

Link to comment
https://forums.phpfreaks.com/topic/143136-php-filtering/
Share on other sites

To help you provide us with more information. How would grab the specific city? Is it part of the form, as I do not see that there.

 

This is probably both PHP and MySQL. To limit a MySQL query even further use the AND keyword in the WHERE clause:

 

WHERE type = 'Architects' AND city = 'My City'

 

That is a rough example, you will have to replace it with your code. Be more descriptive and you might get a more descriptive answer.

Link to comment
https://forums.phpfreaks.com/topic/143136-php-filtering/#findComment-750657
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.