Re: [PHP] Complex MySQL query for lowest price

2013-02-01 Thread Angela Barone
Thank you for everyone's input. Someone suggested the MySQL list, so I posted my question there and got the answer I needed. Regards, Angela -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Complex MySQL query for lowest price

2013-01-31 Thread Stephen
While complex, this is standard SQL. But this is a PHP list :( The way to construct the statement is to use a nested select. Something like this SELECT blah with variable blah WHERE ( SELECT value within dates and assign to variable) To go further I would need to play, and I don't have the

[PHP] Complex MySQL query for lowest price

2013-01-31 Thread Angela Barone
Hello, I have a formula that says, if 'specialprice' is not empty and it is lower than 'unitprice', use 'specialprice', otherwise use 'unitprice': Your Price: $%s', number_format(mysql_result($result,0,"used_price"),2)); ?> What I'd like is to add a starting and ending date and