[PHP-DB] Re: SQL syntax

2013-01-15 Thread Frank Flynn
> Or is there a better way to check multiple options against an enum inside > your select statement? IN for example: orderstatus IN ( 'Cancelled', 'New', 'Denied', 'Expired') However this is not exactly what you are doing. You want different orderdate > $yesterday depending on the orderstatu

Re: [PHP-DB] Re: SQL syntax

2013-01-15 Thread Karl DeSaulniers
True, I guess it never hurts to try. Busy making orders and hadn't tested just yet. I just wanted a professional opinion on if the syntax was common to use, mostly. Didn't want to get a Jr PHP job and use it and have everyone looking at me sideways.. :P Thanks all, Best, Karl On Jan 15, 2

Re: [PHP-DB] Re: SQL syntax

2013-01-15 Thread Bastien
Try It And See Bastien Koert On 2013-01-15, at 7:43 AM, Karl DeSaulniers wrote: > > On Jan 15, 2013, at 5:31 AM, David Robley wrote: > >> Karl DeSaulniers wrote: >> >>> Hello Everyone, >>> Hope your 2013 is treating you well. >>> Quick question and apologies if it is a stupid question. >>> I

Re: [PHP-DB] Re: SQL syntax

2013-01-15 Thread Karl DeSaulniers
On Jan 15, 2013, at 5:31 AM, David Robley wrote: Karl DeSaulniers wrote: Hello Everyone, Hope your 2013 is treating you well. Quick question and apologies if it is a stupid question. Is this a viable syntax? $sql = "SELECT orderid FROM ORDERS_TABLE WHERE orderstatus = 'Cancelled' OR (orderst

[PHP-DB] Re: SQL syntax

2013-01-15 Thread David Robley
Karl DeSaulniers wrote: > Hello Everyone, > Hope your 2013 is treating you well. > Quick question and apologies if it is a stupid question. > Is this a viable syntax? > > $sql = "SELECT orderid > FROM ORDERS_TABLE > WHERE orderstatus = 'Cancelled' OR (orderstatus = ('New' OR > 'Denied' OR 'Expire