Ejemplo n.º 1
0
/**
 * @copyright (C)2014 Cenwor Inc.
 * @author Cenwor <www.cenwor.com>
 * @package php
 * @name global.func.php
 * @date 2014-11-04 13:51:54
 */
 


function order($order_by_list,$query_link='',$config=array())
{
	include_once(FUNCTION_PATH . 'order.func.php');

	return __order($order_by_list,$query_link,$config);
}
Ejemplo n.º 2
0
/**
 * @param $offset
 * @param $limit
 * @param string $table
 * @param array $where
 * @param array $order
 * @return PDOStatement
 */
function paginate($offset, $limit, $table = 'posts', $where = [], $order = [])
{
    global $db, $fillable;
    $query = sprintf("SELECT * FROM %s ", $table, $offset, $limit);
    $query .= __where($where, $db, $fillable);
    $query .= __order($order, $fillable);
    $query .= __limit($offset, $limit);
    return $db->query($query);
    // throw exception if no data
}
Ejemplo n.º 3
0
function order($order_by_list, $query_link = '', $config = array())
{
    include_once ROOT_PATH . 'include/func/order.func.php';
    return __order($order_by_list, $query_link, $config);
}