CodeIgniter Forums
FileMaker CIFX library returns an empty array - CI newbie help - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: FileMaker CIFX library returns an empty array - CI newbie help (/showthread.php?tid=46909)



FileMaker CIFX library returns an empty array - CI newbie help - El Forum - 11-19-2011

[eluser]Unknown[/eluser]
Dear CI Wizards,

I'm a newbie to CI and am just getting my feet wet with the CIFX lib. I got it installed, and when I run the example code/URL of http://localhost:8888/index.php/search/id/1 (from here http://codeigniter.com/wiki/FilemakerPro_Database_Integration ), I get the following result:

Code:
Array
(
)

The good news is my code quasi-works, but I can't figure out why it's not returning results. I notice there's no lines for authenticating into the database - am I missing it somewhere? My full Controller code is below:

Code:
<?php

class Search extends CI_Controller {

function Search()
{

  // Displays the current time just to make sure SOMETHING shows up
  echo date('l jS \of F Y h:i:s A');

      parent::__construct();
}

function id($id)
{  
     // CI knows where to find the
     // CIFX.php FX wrapper file at
     // CI path: application/libraries/CIFX.php
     // FMP WPE data (IP, port, server version,
     // and url scheme) is in custom config file at
     // CI path: application/config/CIFX.php
     $this->load->library('CIFX');
     // tell FX which DB, layout to use and
     // how many records to return
     $this->cifx->SetDBData('buzzerbeater.fp7', 'Users', 1);
     // build a find request, field name, data, comparison
     $this->cifx->AddDBParam ('id', $id, 'eq');
    
     // do find, return dataset, no flattening, meta object
     $res = $this->cifx->DoFXAction(FX_ACTION_FIND, TRUE, TRUE);
     echo '<pre>';
      print_r($res);
     echo '</pre>';
}

}

Thanks in advance for ANY help! :-)

Best,
Denis