Solar_Sql_Adapter_Sqlite::quote()
public
string
Solar_Sql_Adapter_Sqlite::quote
( mixed $val
)
Safely quotes a value for an SQL statement; unlike the main adapter, the SQLite adapter does not quote numeric values.
Parameters
(mixed)
$val
: The value to quote.
Returns
(string) An SQL-safe quoted value (or a string of separated-and-quoted values).
Description
Safely quotes a value for an SQL statement; unlike the main adapter, the SQLite adapter does not quote numeric values.
If an array is passed as the value, the array values are quoted and then returned as a comma-separated string; this is useful for generating IN() lists.
<?php
$sql = Solar::factory('Solar_Sql');
$safe = $sql->quote('foo"bar"');
// $safe == "'foo\"bar\"'"
$safe = $sql->quote(array('one', 'two', 'three'));
// $safe == "'one', 'two', 'three'"