Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Use FX to create multiple find request (And/Or)

Featured Replies

Hi there, i just want to ask how can i create a multiple(And/Or) find request by using PHP FX. For example the find request , A and B or C. It is very easy to do it in Filemaker, but in PHP with using FX, i only can perform one type, either all "And" or all "Or", eg. A and B and C / A or B or C

Hope someone can help me. Thanks for helping.

Regards,

Henry

Hi Henry, you can't do this directly in a single call to FileMaker; Web Companion simply doesn't support it. However, using PHP and FX there is an excellent alternative - make two separate calls to the database, store the results from each separately, then merge the data portions of the results using PHP's merge_array() function. Here is an example:


<?

require_once("FX/FX.php");

$query = new FX("127.0.0.1", "591"); 

 

// Search in Book_List.fp5

//

$query->SetDBData("Book_List.fp5", "Detail_View");

$query->AddDBParam("author", "bowers");

$result_1 = $query->FMFind(); 

 

// Search in Book_List_part_2.fp5

//

$query->SetDBData("Book_List_part_2.fp5", "Detail_View");

$query->AddDBParam("author", "bowers");

$result_2 = $query->FMFind();

 

// Merge the results

//

$result_1["data"] = array_merge($result_1["data"], $result_2["data"]); 

 

// Output the results

//

print "<table border=1 cellpadding=1 cellspacing=1>n";

foreach ($result_1["data"] as $row) {

   print "<tr><td>".$row["author"][0]."</td><td>".$row["title"][0]."</td></tr>n";

}

print "</table>n";

?>

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.