[FX.php List] New Issue with FMFind() ...

Head Honcho headhoncho at customikesolutions.com
Thu Sep 2 18:44:39 MDT 2010


Hi Trish,

Try putting an "=" in front of your $userid, so it reads $serviceName->AddDBParam ('USERID', "=".$userid, 'eq');

From memory, that will make sure you are looking for "something" in the USERID field, and it will produce a "not found" error if the user doesn't exist.

(It's been a while since I've used FX, but this should work)

Hope this helps, somewhat.

Regards

Michael Ward
--
Head Honcho, CustoMike Solutions
Member, FileMaker Business Alliance & FileMaker Technical Network
FileMaker 7, 8, 9 & 10 Certified Developer
ph 0414 562 501
headhoncho at customikesolutions.com

On 03/09/2010, at 4:32 AM, VanBuskirk, Patricia wrote:

> Here is my call…
>  
> $userid=strtoupper($_POST['fsusn']);
>  
> $serviceName = new FX(FM_IP, FM_PORT, FM_VERSION);
> $serviceName->SetDBData('Webtest_Forms.fp7', 'MS_HGcurrent');
> $serviceName->SetDBUserPass(FM_USERNAME, FM_PASSWORD);
> $serviceName->AddDBParam ('USERID', $userid, 'eq');
> $serviceName->AddDBParam ('ENDBILLINGDATE', '*', 'neq');
> $serviceResult=$serviceName->FMFind();
>  
> This works perfect when a user is found, but when I enter a user I know does not exist, it sends back 81511 records!  Where, oh where, did I go wrong?!
>  
> ~ Trish
>  
> From: fx.php_list-bounces at mail.iviking.org [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of VanBuskirk, Patricia
> Sent: Thursday, September 02, 2010 2:02 PM
> To: FX.php Discussion List
> Subject: RE: [FX.php List] XPOST: FMFindAll
>  
> $serviceName->AddDBParam ('ENDBILLINGDATE', '*', 'neq');
>  
> worked … I just had to do a FMFind (not FMFindAll).
>  
> ~ Trish
>  
> From: fx.php_list-bounces at mail.iviking.org [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of VanBuskirk, Patricia
> Sent: Thursday, September 02, 2010 1:49 PM
> To: FX.php Discussion List
> Subject: [FX.php List] XPOST: FMFindAll
>  
> I am trying to do a FMFindAll from the web, for items currently in the database for a user ... BUT I do not want to show any items with anything in the "ENDBILLINGDATE" field.  I've tried the following and none work:
>  
>  
>  
> $serviceName->AddDBParam ('ENDBILLINGDATE', null);
>  
> $serviceName->AddDBParam ('ENDBILLINGDATE', null, 'eq');
>  
> $serviceName->AddDBParam ('ENDBILLINGDATE', '', 'eq');
>  
> $serviceName->AddDBParam ('ENDBILLINGDATE', '*', 'neq');
>  
>  
>  
> What is the proper syntax to use here?
>  
>  
> Thanks in advance,
>  
> Trish
> _______________________________________________
> 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