src/Database/QueryBuilder/StringBuilder.php
/**
	 * Generates a string of types (such as isssissddsdsii) from an array. Useful for prepared statement automation.
	 *
	 * @param array $bindings
	 * @return string
	 */
Generates a string of types (such as isssissddsdsii) from an array. Useful for prepared statement automation.
@param array $bindings
@return string
Generates a string of types ( such as isssissddsdsii ) from an array . Useful for prepared statement automation . @param array $bindings @return string
public static function generateTypes(array &$bindings) {
		$types = array();
		foreach ($bindings as $value) {
			if (is_numeric($value) && strpos($value, '.') === false) $types[] = 'i';
			else if (is_numeric($value)) $types[] = 'd';
			else $types[] = 's';
		}
		return implode('', $types);
	}
public static function generateTypes ( array & $ bindings ) { $ types = array ( ) ; foreach ( $ bindings as $ value ) { if ( is_numeric ( $ value ) && strpos ( $ value , '.' ) === false ) $ types [ ] = 'i' ; else if ( is_numeric ( $ value ) ) $ types [ ] = 'd' ; else $ types [ ] = 's' ; } return implode ( '' , $ types ) ; }
Generates a string of types (such as isssissddsdsii) from an array.
Generates a string of types ( such as isssissddsdsii ) from an array .