/******************************************************************
Html Output
******************************************************************/
- public function rows(&$opt=array(),$opt_by_val=null) {
-
+ public function rows_sql(&$opt=array()) {
if (isset($this->orderby)) self::pdef('orderby',$this->orderby);
- if ($opt_by_val !== null) $opt = $opt_by_val;
-
- $format = $this->p('format');
- if (!$format) bye("Invalid parameter!");
-
//
// Select
//
//
# NB 28.03.16 $this->sql = $sql;
$this->debug(preg_replace('/(,|FROM|WHERE|HAVING|GROUP|ORDER)/i',"\n\\1",$sql),1);
+ return array($sql,$where,$limit);
+ }
+
+ public function rows(&$opt=array(),$opt_by_val=null) {
+
+ if ($opt_by_val !== null) $opt = $opt_by_val;
+
+ $format = $this->p('format');
+ if (!$format) bye("Invalid parameter!");
+
+ list($sql,$where,$limit) = $this->rows_sql($opt);
$st = $this->db()->conn->prepare($sql);
$st->execute();