Universal Search Filter Syntax: Difference between revisions

Jump to navigation Jump to search
m
mNo edit summary
Tag: 2017 source edit
Tag: 2017 source edit
Line 55: Line 55:
Dolibarr provide a method to validate, and convert an USF into a sanitizer SQL string:
Dolibarr provide a method to validate, and convert an USF into a sanitizer SQL string:
<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
$sqlcode = forgeSQLFromUniversalSearchCriteria('string_with_usf_syntax')
$errorstring = '';
$sqlcode = forgeSQLFromUniversalSearchCriteria('string_with_usf_syntax', $errorstring)
</syntaxhighlight>
</syntaxhighlight>
If the USF has a wrong syntax, the function will return the error into the $errorstring.

Navigation menu