Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Ashley Sheridan
On Tue, 2009-07-28 at 09:32 -0400, Miller, Terion wrote: I need to take this: $pastDays = strtotime(-30 days); $past_day = date(d, $pastDays); $past_month = date(m, $pastDays); $past_year =date(y, $pastDays); And make it into one var to compare to a db field that is

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Richard S. Crawford
On Tue, Jul 28, 2009 at 6:32 AM, Miller, Teriontmil...@springfi.gannett.com wrote: I need to take this:   $pastDays = strtotime(-30 days); $past_day = date(d, $pastDays); $past_month = date(m, $pastDays); $past_year =date(y, $pastDays); And make it into one var to compare to a db

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Miller, Terion
On 7/28/09 8:35 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: $pastDays = strtotime(-30 days); $date = date(d/m/y, $pastDays); Well I tried and got no results from my query and I know there results with date ranges in the last 30 days, I basically need to count backward from now() 30

RE: [PHP] Making several variables into 1 variable

2009-07-28 Thread Bob McConnell
From: Ashley Sheridan On Tue, 2009-07-28 at 09:32 -0400, Miller, Terion wrote: I need to take this: $pastDays = strtotime(-30 days); $past_day = date(d, $pastDays); $past_month = date(m, $pastDays); $past_year =date(y, $pastDays); And make it into one var to compare to a

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Ashley Sheridan
On Tue, 2009-07-28 at 09:42 -0400, Miller, Terion wrote: On 7/28/09 8:35 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: $pastDays = strtotime(-30 days); $date = date(d/m/y, $pastDays); Well I tried and got no results from my query and I know there results with date ranges in

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Miller, Terion
On 7/28/09 8:41 AM, Bob McConnell r...@cbord.com wrote: From: Ashley Sheridan On Tue, 2009-07-28 at 09:32 -0400, Miller, Terion wrote: I need to take this: $pastDays = strtotime(-30 days); $past_day = date(d, $pastDays); $past_month = date(m, $pastDays); $past_year =date(y,

RE: [PHP] Making several variables into 1 variable

2009-07-28 Thread Ashley Sheridan
On Tue, 2009-07-28 at 09:41 -0400, Bob McConnell wrote: From: Ashley Sheridan On Tue, 2009-07-28 at 09:32 -0400, Miller, Terion wrote: I need to take this: $pastDays = strtotime(-30 days); $past_day = date(d, $pastDays); $past_month = date(m, $pastDays);

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Miller, Terion
On 7/28/09 8:44 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2009-07-28 at 09:42 -0400, Miller, Terion wrote: On 7/28/09 8:35 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: $pastDays = strtotime(-30 days); $date = date(d/m/y, $pastDays); Well I tried and got no

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Ashley Sheridan
On Tue, 2009-07-28 at 06:46 -0700, Miller, Terion wrote: On 7/28/09 8:44 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2009-07-28 at 09:42 -0400, Miller, Terion wrote: On 7/28/09 8:35 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: $pastDays = strtotime(-30

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Bastien Koert
On Tue, Jul 28, 2009 at 9:46 AM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/28/09 8:44 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2009-07-28 at 09:42 -0400, Miller, Terion wrote: On 7/28/09 8:35 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: $pastDays

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Miller, Terion
On 7/28/09 8:52 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2009-07-28 at 06:46 -0700, Miller, Terion wrote: On 7/28/09 8:44 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2009-07-28 at 09:42 -0400, Miller, Terion wrote: On 7/28/09 8:35 AM, Ashley Sheridan

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Ian
On Tue, 2009-07-28 at 09:42 -0400, Miller, Terion wrote: On 7/28/09 8:35 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: $pastDays = strtotime(-30 days); $date = date(d/m/y, $pastDays); Well I tried and got no results from my query and I know there results with date

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Floyd Resler
On Jul 28, 2009, at 9:55 AM, Miller, Terion wrote: On 7/28/09 8:52 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2009-07-28 at 06:46 -0700, Miller, Terion wrote: On 7/28/09 8:44 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2009-07-28 at 09:42 -0400,

RE: [PHP] Making several variables into 1 variable

2009-07-28 Thread Bob McConnell
From: Miller, Terion On 7/28/09 8:35 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: $pastDays = strtotime(-30 days); $date = date(d/m/y, $pastDays); Well I tried and got no results from my query and I know there results with date ranges in the last 30 days, I basically need to count

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Miller, Terion
,snip You can also do this right within MySQL without needing to create a variable. This should work: $sql = SELECT DISTINCT restaurants.ID, name, address, inDate FROM restaurants, inspections WHERE restaurants.name != '' AND datediff(curdate(),inspections.inDate)=30 GROUP BY restaurants.ID

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Bastien Koert
On Tue, Jul 28, 2009 at 10:34 AM, Bob McConnellr...@cbord.com wrote: From: Miller, Terion On 7/28/09 8:35 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: $pastDays = strtotime(-30 days); $date = date(d/m/y, $pastDays); Well I tried and got no results from my query and I know there

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Miller, Terion
On 7/28/09 9:40 AM, Bastien Koert phps...@gmail.com wrote: On Tue, Jul 28, 2009 at 10:34 AM, Bob McConnellr...@cbord.com wrote: From: Miller, Terion On 7/28/09 8:35 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: $pastDays = strtotime(-30 days); $date = date(d/m/y, $pastDays); Well

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Bastien Koert
On Tue, Jul 28, 2009 at 10:40 AM, Miller, Teriontmil...@springfi.gannett.com wrote: ,snip You can also do this right within MySQL without needing to create a variable.  This should work: $sql = SELECT DISTINCT restaurants.ID, name, address, inDate FROM restaurants, inspections WHERE

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Bastien Koert
On Tue, Jul 28, 2009 at 10:43 AM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/28/09 9:40 AM, Bastien Koert phps...@gmail.com wrote: On Tue, Jul 28, 2009 at 10:34 AM, Bob McConnellr...@cbord.com wrote: From: Miller, Terion On 7/28/09 8:35 AM, Ashley Sheridan

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Shawn McKenzie
Bastien Koert wrote: On Tue, Jul 28, 2009 at 10:43 AM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/28/09 9:40 AM, Bastien Koert phps...@gmail.com wrote: On Tue, Jul 28, 2009 at 10:34 AM, Bob McConnellr...@cbord.com wrote: From: Miller, Terion On 7/28/09 8:35 AM, Ashley Sheridan