i have this function:
public function obtenerListaRegistros($where = NULL) {
$bdObjeto = static::query();
if ($where != NULL) {
foreach ($where AS $w) {
$bdObjeto->where($w['columna'], $w['condicional'], $w['valor']);
}
}
return $bdObjeto->toSql();
}
the array $where is similar to:
array(
0 => array(
'columna' => 'deleted'
'condicional' => '=',
'valor' => 0
)
);
but it returns select * from usuario
where delected
= ? instead select * from usuario
where deleted
= 0 ...
I had tried without the foreach but it still showing the "?" and the ->get() function but this returns all rows...
thanks in advance