Jump to content

fmExecuteSQL - returns empty result when there should be one


This topic is 3456 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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 );
Link to comment
Share on other sites

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
Link to comment
Share on other sites

This topic is 3456 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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