Re: [PHP-DB] SELECT online store discount %

2011-08-22 Thread Ron Piggott
011 5:45 AM To: Ron Piggott Cc: php-db@lists.php.net Subject: Re: [PHP-DB] SELECT online store discount % Ron Have u thought of CASE (in SELECT). Remebber their is some syntactical difference in "CASE" for SELECT and "CASE" in procedures regds amit "The diff

Re: [PHP-DB] SELECT online store discount %

2011-08-22 Thread Amit Tandon
Ron Have u thought of CASE (in SELECT). Remebber their is some syntactical difference in "CASE" for SELECT and "CASE" in procedures regds amit "The difference between fiction and reality? Fiction has to make sense."

[PHP-DB] SELECT online store discount %

2011-08-20 Thread Ron Piggott
I am trying to write a database query that determine the customer loyalty discount for an online store. I am wondering if there is a way of doing this as 1 query, instead of multiple and using PHP to do the math? - I want to offer a 10% discount if the person is a subscriber SELECT 10 AS disc