1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
$some_ids = array(12, 95, 1891, 98791, 510);
$sql = "SELECT * FROM maTable WHERE id IN (%q) AND name LIKE '%s' AND active = '%i'";
$sqlData = array($some_ids, "%recherche%", 1);
$this->sql->query($sql, $sqlData);
// OU ENCORE
$some_ids = array(12, 95, 1891, 98791, 510);
$this->sql->query("SELECT * FROM maTable WHERE id IN (%q) AND name LIKE '%s' AND active = '%i'", array($some_ids, "%recherche%", 1));
// OU ENCORE
$some_ids = array(12, 95, 1891, 98791, 510);
$sql = "SELECT * FROM maTable WHERE id IN (%q) AND name LIKE '%s' AND active = '%i'";
$this->sql->query($sql, array($some_ids, "%recherche%", 1));
// OU ENCORE
$sql = "SELECT * FROM maTable";
$this->sql->query($sql); |
Partager