[FX.php List] If statements

Josh Shrier joshshrier at gmail.com
Thu Sep 11 02:56:56 MDT 2008


With these variables how can I trap here for the error code of the found
code?

 

 

$search=new FX('','');

$search->SetDBData(');

$search->SetDBPassword();

$search->AddDBParam('User_search',"==".$username);

$search->AddDBParam('Pass_search',"==".$password);

"?????"

$searchResult =$search -> FMFind();

foreach($searchResult['data'] as $key=>$searchData)

 

  _____  

From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Tim 'Webko' Booth
Sent: Thursday, September 11, 2008 9:01 AM
To: FX.php Discussion List
Subject: Re: [FX.php List] If statements

 

 

On 11/09/2008, at 1:44 PM, Josh Shrier wrote:





I want to trap if found count is 0 display message and nothing else and if
found count>0 display results page. Can someone please help me.

 

In the original find:

 

                        $searchProject = $searchProject -> FMFind();

                        $searchProjectCount = $searchProject['foundCount'];

 

In the page

 

<?php              if ($searchProjectCount == 0) { ?>

<h1>Oh noes, there's nothing therrrreeeee</h1>

 

<?php              } else { ?>

<h1>Whatever is to appear other wise</h1>

 

<?php              } ?>

 

 

That's if you didn't trap for a 401 in the first place...

 

Cheers

 

Webko

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20080911/f423f538/attachment.html


More information about the FX.php_List mailing list