fm_sql_select_ex


mixed fm_sql_select_ex ( string $sql_query [, string $file_name [, arguments... ]] )


 

Description


Allows you to perform SQL SELECT queries against a FileMaker file and return the results as a PHP array.

See FileMaker’s SQL Reference for more info on SQL support in FileMaker.

 

Parameters


sql_query (required)
A valid SQL SELECT statement. The query must begin with “SELECT”.

file_name (optional) (only available in FileMaker 11 or higher)
Allows you to specify the name of the file in which to run the query. The current file will be used by default so this is only needed if the table(s) you’re querying are in a different file. Note that the file must be open.

arguments... (optional) (only available in FileMaker 11 or higher)
Any number of optional arguments corresponding to the dynamic parameters (?’s) in your query.

 

Return


Returns the result of the query as a PHP array or false if an error occurs.

Most errors are caused by invalid SQL statements. Use fm_get_last_error to get error details.

 

Errors


106 Invalid parameter (returned when query doesn’t begin with “SELECT”)

 

Example 1 -
// Todo

Change Log

VersionDescription
3.0.0New function – returns the result as a PHP array and includes support for returning container fields.