[FX.php List] AddDBParam and dates

Andy Gaunt andy at fmpug.com
Mon Jun 5 10:05:55 MDT 2006


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




More information about the FX.php_List mailing list