Universal Search Filter Syntax: Difference between revisions

Jump to navigation Jump to search
m
Tag: 2017 source edit
Tag: 2017 source edit
Line 59: Line 59:
<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
$errorstring = '';
$errorstring = '';
$sqlcode = forgeSQLFromUniversalSearchCriteria('string_with_usf_syntax', $errorstring)
$sqlcode = forgeSQLFromUniversalSearchCriteria('string_with_usf_syntax', $errorstring);
if (! errorstring) {
    // Here the $sqlcode is a valid SQL "where" string
} else {
    // Here the $sqlcode is not valid
}
</syntaxhighlight>
</syntaxhighlight>


If the USF has a wrong syntax, the function will return the error into the $errorstring variable.
If the USF has a wrong syntax, the function will return the error into the $errorstring variable.

Navigation menu