genSlots()
genSlots(array $array, string|NULL $template = NULL) : string
Generates question mark slots for an array of values.
Given an array and an optional template string this method will produce string containing parameter slots for use in an SQL query string.
Usage:
R::genSlots( array( 'a', 'b' ) );
The statement in the example will produce the string: '?,?'.
Another example, using a template string:
R::genSlots( array('a', 'b'), ' IN( %s ) ' );
The statement in the example will produce the string: ' IN( ?,? ) '.
Parameters
array | $array | array to generate question mark slots for |
string|NULL | $template | template to use |