bind params

This commit is contained in:
Devin Smith 2015-03-02 09:45:59 -08:00
parent b4d7050b62
commit 4833f73fd1

View File

@ -4,7 +4,7 @@ class Crunchbutton_Site extends Cana_Table {
public function config($key = null) {
if (!isset($this->_config)) {
$global = Crunchbutton_Config::q('select * from config where id_site is null');
$site = Crunchbutton_Config::q('select * from config where id_site="'.$this->id_site.'"');
$site = Crunchbutton_Config::q('select * from config where id_site=?',[$this->id_site]);
foreach ($global as $c) {
$this->_config[$c->key] = $c;