Re: how could I do this ?
| From: | James Atkinson | Date: | Fri, 03 Nov 2000 17:10:51 +0000 |
| Subject: | Re: how could I do this ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-23602@lists.php.net to get a copy of this message | ||
On Fri, 03 Nov 2000, Gianni wrote:
> Hi all
>
> I would like to do the following.
> I need to selecr data from the db with regards to monetary values eg. =
> 5000 to 10000, 30000to 90000
> where the first value is gotten from a dropdown and the second from a =
> nother dropdown
>
> I think I undertsand how to do it but I'd like to be sure
>
> thanks
> Gianni
OK, say dropdown list 1 is called low_value, and drop down list 2 is high_value
After you POST/GET your data you're script would do something like this:
$sql = "SELECT money FROM cash WHERE money >= $low_value AND money <= $high_value";
Then preform whatever database routiens are needed depending on the DB software
you're running.
--
James Atkinson
-----------------------------------------------------------------
James Atkinson 100world
Technical Developer 512-1529 West 6th Avenue
phone: +1-604-637-8122 Vancouver, BC, V6J 1R1
fax: +1-604-742-1770 Canada
email: james.atkinson@100world.com http://www.100world.com
+---------------------------------------------------------------+
| This message may contain confidential and/or privileged |
| information. If you are not the addressee or authorized to |
| receive this for the addressee, you must not use, copy, |
| discolse or take any action based on this message or any |
| information herein. If you have received this message in |
| error, please advise the sender immediately by reply e-mail |
| and delete this message. Thank you for you cooperation |
+---------------------------------------------------------------+