[FX.php List] Need help building search into website

Bob Patin bob at patin.com
Thu Nov 9 15:34:03 MST 2006


John,

This will give you an exact match; replace

> $query->AddDBParam ('creditorName', $_POST['creditorName']);

with

> $query->AddDBParam ('creditorName','=='.$_POST['creditorName']);

Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com

   CONTACT US VIA INSTANT MESSAGING:
      AIM or iChat: longterm1954
      Yahoo: longterm_solutions
      MSN: tech at longtermsolutions.com
      ICQ: 159333060




On Nov 9, 2006, at 4:30 PM, John Rice wrote:

> Help! I'm trying to build search into my website. I've gotten it to  
> return all records in a Filmaker database, but can't get it to  
> return an exact match. For instance, I want to find "Pleva"  
> exactly. The code looks like this:
>
> <?php
>
> include_once ('FX.php');
> include_once ('server_data.php');
> require_once('FMErrors.php');
>
> $query = new FX("127.000.1.9", "80"); // IP address and
>                                      // port of the Web
>                                      // Companion
> $query-> SetDBData('ffc_webdata.fp7' , 'web_completedsettlements');
>
>
> $query-> SetDBPassword(FM_PASSWORD , FM_USERNAME);
>
> $query->AddDBParam ('creditorName', $_POST['creditorName']);
>
> $result = $query->FMFind();
>
> if ($result['foundCount'] == 0) {
>   echo "No records matched your selection. Please try
>   again";
> }  else {
>   echo "Search Results<br><br><br>";
>   echo "<table with=60% border=1>";
>   echo "<tr><td>Creditor Name";
>   foreach ($result['data'] as $recordKey =>$recordData) {
>     echo "<tr>";
>     echo "<td>".$recordData['creditorName'][0]."</td>";
>     echo "</tr>";
>   }
>   echo "</table>";
> }
> ?>
>
>
>
> Any help would be greatly appreciated! Thank you!
> _______________________________________________
> 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