Re: [PHP-DB] Database help needed

2001-11-21 Thread Jason Wong


> This may sound like an odd question and something that I should know,
> but ...
>
> I need to display results by amount - for example, for all properties
> which are either or between 450,000 and 500,000 (For example) - how
> using PHP and MySQL do I get it to display 450,000, 50,000 and all
> inbetween ???  I can easily get it to display one or the other, but
> it is a search which is based on cost of property.  How will I format
> the MySQL query to get it to do this?

You can do something like:

  SELECT * FROM property WHERE price BETWEEN 45 AND 50;

hth
-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Skill without imagination is craftsmanship and gives us many useful 
objects such as wickerwork picnic baskets. Imagination without skill 
gives us modern art. -- Tom Stoppard
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Database help needed

2001-11-21 Thread Beau Lebens

should be able to do something like

SELECT whatever FROM whereever WHERE value<='50' AND value>='45'

is that what you are looking for?

// -Original Message-
// From: Chris Payne [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 22 November 2001 3:11 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Database help needed
// 
// 
// Hi there everyone,
// 
// This may sound like an odd question and something that I 
// should know, but ...
// 
// I need to display results by amount - for example, for all 
// properties which are either or between 450,000 and 500,000 
// (For example) - how using PHP and MySQL do I get it to 
// display 450,000, 50,000 and all inbetween ???  I can easily 
// get it to display one or the other, but it is a search which 
// is based on cost of property.  How will I format the MySQL 
// query to get it to do this?
// 
// Please help a little english guy lost in the USA :-)
// 
// Thank you everyone, it's very appreciated.
// 
// Regards
// 
// Chris
// 
// www.planetoxygene.com
// 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]