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.

fmExecuteSQL - returns empty result when there should be one

Featured Replies

Tim

 
Having trouble getting fmExecuteSQL to retrun anything except a ?,  I have reduced the SQL query to something very basic. I have run the query in FM using ExecuteSQL statement.  Here is the message I get:

"Warning: Illegal string offset 'Result_Rows_Found_Count' in /home4/wimlibby/public_html/esvw.com/portal/dashboard/dashboard-meetings-committed.php on line 31"
 
I think I installed FMWebFrame properly (Version 13e) and have tested using some of the FM-to-PHP translators to make sure settings were correct and they work.  Only thing I have not done is tried to install 404.php - just thought it was needed for containers so waiting until I need it.
 
Any ideas what to check next? 

	$sql = " 
		SELECT 
			First_Name 
		FROM  
			Contacts  
		WHERE 
			Status='Active'
		";

$execute_sql = fmExecuteSQL ( $fmVanWie, $sql );

Wim --

 

It could be that there are hidden characters in the $sql variables that FileMaker is having a problem with.

 

You might want to try removing the whitespace to see what happens, like this:

 

$sql = "SELECT First_Name FROM Contacts WHERE Status='Active'"; 

$execute_sql = fmExecuteSQL ( $fmVanWie, $sql );
 
In cases like this, I often use BBEdit (Mac) to view hidden characters. It also provides a nice "zap gremlins" command to remove potentially problematic characters in the text.
 
-- Tim
  • Author

Thank Tim, I used str_replace to strip out all the returns and was able to get a result!

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.