[FX.php List] AddDBParam and dates

Nick Trenary trenaryn at crlibrary.org
Mon Jun 5 10:48:18 MDT 2006


Ah....The information from this email and from Andy Gaunt showed me a 
couple of errors I was making. 

Thank you both.
Nick

Laura Long wrote:
> Here is what works for me...
>
> $thisDay=(date("m/d/Y"));
>
> $benefits=new FX($serverIP,$webCompanionPort,'FMPro7');
> $benefits->SetDBData('databasse.fp7','layout');
> $benefits->SetDBPassword('password','Webuser');
> $benefits->AddDBParam('activation',$thisDay,lte);
> $benefits->AddDBParam('expiration',$thisDay,gte);
> $benefitsResult=$benefits->FMFind();
>
> hth
>
> Laura Long
> Database/Web Designer
> http://www.workplaceoptions.com
>
>
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Andy Gaunt
> Sent: Monday, June 05, 2006 12:06 PM
> To: 'FX.php Discussion List'
> Subject: RE: [FX.php List] AddDBParam and dates
>
>
> Nick,
>
> First try changing your FMFindAll to an FMFind()
>
> The find all will ignore your AddDBParam queries and return all the
> records.
>
> Andy Gaunt
> T: 407.810.4722
> andy at fmpug.com
> http://www.fmpug.com    
>
> Recipient of FileMaker's 2005 "Mad Dog" Public Relations Award
>
> For chapter locations, dates & times please visit the website at
> http://www.fmpug.com If you can make it to a meeting, please RSVP at
> http://www.fmpug.com/rsvp.php
>
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Nick Trenary
> Sent: Monday, June 05, 2006 11:58 AM
> To: FX.php Discussion List
> Subject: [FX.php List] AddDBParam and dates
>
> I'm having trouble figuring out how to use the AddDBParam function using
>
> FileMaker dates.  I need to search my db and see if today's date falls 
> between the start and end dates on a couple of fields in each record.  
> Here's what I have in the beginning of my php:
>
> $today = date("n/j/Y");
> $query = new FX ($serverIP, $webCompanionport); 
> $query->SetDBData('holidays.fp5', 'web', 'All'); '
> $query->AddDBParam($today, 'Start_date', $op="gte"); 
> $query->AddDBParam($today, 'End_date', $op="lte"); 
> $query->AddSortParam('Start_date'); 
> $result = $query->FMFindAll();
>
> What am I missing here?  I know from previous php and FM experience that
>
> FM formats the dates differently than php.
>
> Thanks,
> Nick
>
>   





More information about the FX.php_List mailing list