Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function selectAllSorted($active)
- {
- return $this->selectObjects("SELECT bp.*, p.title as product_title
- FROM $this->_table bp
- INNER JOIN ?_product p USING (product_id)
- ORDER BY 0+sort_order,p.title");
- }
- function selectAllSorted($active)
- {
- return $this->selectObjects("SELECT bp.*, p.title as product_title
- FROM $this->_table bp
- WHERE product_id =$active
- INNER JOIN ?_product p USING (product_id)
- ORDER BY 0+sort_order,p.title");
- }
- function selectObjects($sql, $param1 = null)
- {
- $args = func_get_args();
- $q = call_user_func_array(array($this->_db, 'queryResultOnly'), $args);
- $ret = array();
- while ($row = $this->_db->fetchRow($q))
- {
- $obj = new $this->_recordClass($this);
- $obj->fromRow($row);
- $ret[] = $obj;
- }
- return $ret;
- }
- function selectAllSorted($active)
- {
- return $this->selectObjects("SELECT bp.*, p.title as product_title
- FROM $this->_table bp
- INNER JOIN ?_product p USING (product_id)
- WHERE bp.product_id =$active
- ORDER BY 0+sort_order,p.title");
- }
- Select t1.* from table1 t1
- inner join table2 t2 on t1.col1=t2.col1
- where t1.col2> 0 and t2.col3>4
- function selectAllSorted($active)
- {
- return $this->selectObjects("SELECT bp.*, p.title as product_title
- FROM $this->_table bp
- INNER JOIN ?_product p on pb.product_id=p.product_id
- WHERE bp.product_id =$active
- ORDER BY 0+sort_order,p.title");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement