[FX.php List] [OT] Planning for/handling Server Outage
Jonathan Schwartz
jschwartz at exit445.com
Mon Dec 17 14:25:17 MST 2007
Instead of using FMView(), I just tried FMPDBNames().
While it does list open DB's, I can't seem to get the boolean to work
to test for the error:
<
include_once('../FX/FX.php');
include_once('../FX/FX_Error.php');
include_once('../FX/server_data.php');
$find = new FX($serverIP);
$findResult = $find->FMDBNames();
echo "Foundcount: ".$findResult['foundCount'];
echo "Error Code: ".$findResult['errorCode'];
if(in_array("DesiredDatabaseName",$findResult))
{
echo "OK";
}else{
echo "Fail";
}
foreach($findResult['data'] as $value)
echo $value['DATABASE_NAME'][0].'<br>';
This produces a list of the databases, but the If statement returns
"Fail" when I use the in_array function, although the db appears in
the list. I also tried $findResult['data'] with no difference.
What am I doing wrong?
J
At 10:33 AM -0600 12/17/07, Alex Gates wrote:
>Hi Jonathan -
>...I first do a quick fmview() to test connectivity to the database.
--
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-381-1852
More information about the FX.php_List
mailing list