[FX.php List] AddDBParam and dates
Laura Long
laural at ultimate-products.com
Mon Jun 5 10:52:17 MDT 2006
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
--
Nick Trenary
Computer Information Systems Analyst
Cedar Rapids Public Library
Office: 319.398.5145 x267
Cell: 319.310.7699
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list