fm_sql_select
mixed fm_sql_select ( string $sql_query
[, int $field_separator
[, int $record_separator
[, string $file_name
[, arguments...
]]]] )
Description
Allows you to perform SQL SELECT queries against FileMaker tables and return the results.
This function is similar to the ExecuteSQL function that was added in FileMaker 12.
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”.
field_separator
(optional)
ASCII or Unicode character code. The pipe character “|” (code 124) is the default. Pass in 0 to use the default.
record_separator
(optional)
ASCII or Unicode character code. The return character “¶” (code 13) is the default. Pass in 0 to use the default.
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 or false if an error occurs.
Most errors are caused by invalid SQL statements. Use fm_get_last_error to get error details.
Errors
// Todo
Change Log
Version | Description |
---|---|
3.0.0 | Added optional parameters: file_name and arguments... |