public function select($a,$b,$c) { $result = Array(); $q = mysql_query("select ".$a." from .".$this->prefix."_$b. $c", $this->link ); if ($q != '') while ($row = mysql_fetch_assoc($q)) { array_push($result,$row); } unset($a); unset($<img src='https://forum.ee/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' />; unset($c); unset($q); return $result;
И передаётся сюда
$res = $db->select('*','foodbase','where .price_eu. limit 20');
Вопрос как изменить функцию select чтобы
вместо limit 20 можно было бы писать 20
Спасибо.
P.S.
Вариант c ошибкой
public function select($a,$b,$c,$d) { $result = Array(); $q = mysql_query("select ".$a." from .".$this->prefix."_$b. $c Limit $d", $this->link ); if ($q != '') while ($row = mysql_fetch_assoc($q)) { array_push($result,$row); } unset($a); unset($<img src='https://forum.ee/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' />; unset($c); unset($q); unset ($d); return $result;
Сообщение изменено: motorov (01 марта 2011 - 00:54 )