[FX.php List] Query failing mysteriously...

Bob Patin bob at patin.com
Tue Jan 29 12:11:46 MST 2008


Actually, once I looked at it, I figured out 2 mistakes:

1 - my variable "$foundcount" wasn't from $logResult['foundCount'],  
but was from a loop where I'm building an array.

2 - my date math was missing the STRTOTIME command to take date  
strings and put them in a format for doing comparison math...

Once I fixed those my problems went away...

Now on to other things...

Thanks for your response,

Bob


On Jan 29, 2008, at 1:08 PM, Steve Winter wrote:

> Hi Bob,
>
> So if I translate for a moment from American, what you're saying is  
> you want
> all records in which that date is from 1st of December 2007 to the  
> 28th of
> January 2008...?
>
> I presume that the query works in FMP... I know on my 'English'  
> system if I
> search for 1/12/2007...28/1/2008 I get the expected results back  
> within
> FMP...
>
> I've also just tried this query on the same table;
>    $schoolNameQuery = new FX($serverIP, $serverPort, $dataSourceType);
>    $schoolNameQuery->SetDBUserPass($webUN, $webPW);
>    $schoolNameQuery->SetDBData($databaseName, "webConductList",  
> 'all');
>    $schoolNameQuery->AddDBParam('Date', '12/1/2007...1/28/2008');
>    $schoolNameData = $schoolNameQuery->FMFind();
> Which delivers the goods just fine...
>
> I'd begin to suspect layout corruption...??
>
> Cheers
> Steve
>
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Bob Patin
> Sent: 29 January 2008 18:34
> To: FX.php Discussion List
> Subject: [FX.php List] Query failing mysteriously...
>
> I've got a query that has the following parameters:
>
> userid = numeric (I don't think this is the problem)
>
> date range = something like
>
> $range = "12/01/2007...01/28/2008";
>
> Here's my query code:
>
> //GET LOG
> $log=new FX($serverIP,$webCompanionPort);
> $log->SetDBData('xxxx.fp7','log','All');
> $log->SetDBPassword('xxxx','xxxx');
> $log->AddSortParam('model_name');
> $log->AddSortParam('comp_name');
> $log->AddDBParam('d_access',$range);
> $log ->AddDBParam('-lop', 'or');
> $logResult=$log->FMFind();
>
> When I run this page, I get no results with the date range above...
>
> Shouldn't this find records properly? If I change the date range to
>
> "01/01/2008...01/28/2008"
>
> it works properly...
>
> Thanks,
>
> Bob
>
>
> _______________________________________________
> 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