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, > Terion wrote: >> >> >> On 7/28/09 9:40 AM, "Bastien Koert" wrote: >> >> On Tue, Jul 28, 2009 at 10:34 AM, Bob McConnell wrote: >>> From: Miller, Terion >>> On 7/28/09 8:35 AM, "Ashley Sheridan" wrote: >>> $pastDays = strtotim

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Bastien Koert
On Tue, Jul 28, 2009 at 10:43 AM, Miller, Terion wrote: > > > > On 7/28/09 9:40 AM, "Bastien Koert" wrote: > > On Tue, Jul 28, 2009 at 10:34 AM, Bob McConnell wrote: >> From: Miller, Terion >> On 7/28/09 8:35 AM, "Ashley Sheridan" wrote: >> >>> $pastDays = strtotime("-30 days"); >>> $date = date(

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Bastien Koert
On Tue, Jul 28, 2009 at 10:40 AM, Miller, Terion 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 restaurants.name !=

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Miller, Terion
On 7/28/09 9:40 AM, "Bastien Koert" wrote: On Tue, Jul 28, 2009 at 10:34 AM, Bob McConnell wrote: > From: Miller, Terion > On 7/28/09 8:35 AM, "Ashley Sheridan" wrote: > >> $pastDays = strtotime("-30 days"); >> $date = date("d/m/y", $pastDays); >> >> Well I tried and got no results from my qu

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Bastien Koert
On Tue, Jul 28, 2009 at 10:34 AM, Bob McConnell wrote: > From: Miller, Terion > On 7/28/09 8:35 AM, "Ashley Sheridan" 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

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

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" 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

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" wrote: On Tue, 2009-07-28 at 06:46 -0700, Miller, Terion wrote: On 7/28/09 8:44 AM, "Ashley Sheridan" wrote: On Tue, 2009-07-28 at 09:42 -0400, Miller, Terion wrote: On 7/28/09 8:35 AM, "

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" 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 ran

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Miller, Terion
On 7/28/09 8:52 AM, "Ashley Sheridan" wrote: On Tue, 2009-07-28 at 06:46 -0700, Miller, Terion wrote: On 7/28/09 8:44 AM, "Ashley Sheridan" wrote: On Tue, 2009-07-28 at 09:42 -0400, Miller, Terion wrote: > > > On 7/28/09 8:35 AM, "Ashley Sheridan" wrote: > > $pastDays = strtotime("-30 da

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Bastien Koert
On Tue, Jul 28, 2009 at 9:46 AM, Miller, Terion wrote: > > > > On 7/28/09 8:44 AM, "Ashley Sheridan" wrote: > > On Tue, 2009-07-28 at 09:42 -0400, Miller, Terion wrote: >> >> >> On 7/28/09 8:35 AM, "Ashley Sheridan" wrote: >> >> $pastDays = strtotime("-30 days"); >> $date = date("d/m/y", $pastDay

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" wrote: > > On Tue, 2009-07-28 at 09:42 -0400, Miller, Terion wrote: > > > > > > On 7/28/09 8:35 AM, "Ashley Sheridan" wrote: > > > > $pastDays = strtotime("-30 days"); > > $date = date("d/m/y"

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Miller, Terion
On 7/28/09 8:44 AM, "Ashley Sheridan" wrote: On Tue, 2009-07-28 at 09:42 -0400, Miller, Terion wrote: > > > On 7/28/09 8:35 AM, "Ashley Sheridan" wrote: > > $pastDays = strtotime("-30 days"); > $date = date("d/m/y", $pastDays); > > Well I tried and got no results from my query and I know ther

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 = d

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Miller, Terion
On 7/28/09 8:41 AM, "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); >> >> $past_ye

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" 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 d

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 m

Re: [PHP] Making several variables into 1 variable

2009-07-28 Thread Miller, Terion
On 7/28/09 8:35 AM, "Ashley Sheridan" 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 days I thought strt

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, 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 tha

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