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.

Featured Replies

Hey Guys,

i've got a filemaker script which uses the execute sql command a couple of time to retrieve data which is contextless.

i now need to port/convert that FileMaker script So it works with PHP API. When i've worked with the API in the past there was no command equivalent to execute sql, is it still the case - or is there a work around to this. Worse case scenario is for me to create a FileMaker script and get the api to perform script and store the result in php variable. However really wanted to keep php scripts isolated from my FM scripts.

Thanks in advance

 

Effectively an API call works a lot like an ExecuteSQL - you should be able to write in PHP to work the same...

eg

Let([
query = "select\"Agreement No\", \"Customer ID\", \"End Date\", \"Agreement Type\", \"Status\", \"Created\"
	FROM Agreements
	WHERE Agreements.Status = ?
	ORDER BY \"Agreement No\" ";
result = ExecuteSQL( query ; "," ; ""
	; "Current")
];
result
)

Would be the same as going to a layout with 6 fields listed, based on the Agreements TO, then finding the Status = Current and sorting by Agreement No....

12 hours ago, Jalz said:

i now need to port/convert that FileMaker script So it works with PHP API. When i've worked with the API in the past there was no command equivalent to execute sql,

 

You don't have to use the PHP API, you can just make an ODBC connection to FMS from PHP if you prefer...

 

12 hours ago, Jalz said:

i now need to port/convert that FileMaker script So it works with PHP API. When i've worked with the API in the past there was no command equivalent to execute sql, is it still the case - or is there a work around to this. Worse case scenario is for me to create a FileMaker script and get the api to perform script and store the result in php variable. However really wanted to keep php scripts isolated from my FM scripts.

 

You can call a script from the web publishing engine as well, which includes the PHP API. You could also use something like Simple FM (https://github.com/soliantconsulting/SimpleFM) as an alternative, but they both use WPE.

Just remember there is a little extra overhead when running a script via WPE, since it builds up a session for globals and variables and such when it runs your script.

Also make sure your script is safe to run server side, and provides the correct context explicitly.

Mike

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.