Subversion-Projekte lars-tiefland.ci

Revision

Revision 1397 | Revision 1402 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 1397 Revision 1400
Zeile 3... Zeile 3...
3
/**
3
/**
4
 *
4
 *
5
 * @package WebanOS CI
5
 * @package WebanOS CI
6
 * @author Lars Tiefland <ltiefland@gmail.com> 
6
 * @author Lars Tiefland <ltiefland@gmail.com> 
7
 * @copyright 2016
7
 * @copyright 2016
8
 * @version $Rev: 1397 $
8
 * @version $Rev: 1400 $
9
 */
9
 */
Zeile 10... Zeile 10...
10
 
10
 
11
class Order_model extends CI_Model
11
class Order_model extends CI_Model
12
{
12
{
Zeile 498... Zeile 498...
498
		}
498
		}
499
		if (!$sql_filter)
499
		if (!$sql_filter)
500
		{
500
		{
501
			$sql_filter[] = "1";
501
			$sql_filter[] = "1";
502
		}
502
		}
-
 
503
		$ret = array(
503
		$orders = array();
504
			"orders" => array(),
-
 
505
			"orderAnz" => 0,
-
 
506
			);
504
		$sql = "SELECT
507
		$sql = "SELECT SQL_CALC_FOUND_ROWS
505
				b.id
508
				b.id
506
			FROM
509
			FROM
507
				bestellart ba,
510
				bestellart ba,
508
				Logins AS l,
511
				Logins AS l,
509
				shops AS s,
512
				shops AS s,
Zeile 526... Zeile 529...
526
		";
529
		";
527
		$res = $GLOBALS['order_db']->query($sql);
530
		$res = $GLOBALS['order_db']->query($sql);
528
		while ($order = $res->unbuffered_row('array'))
531
		while ($order = $res->unbuffered_row('array'))
529
		{
532
		{
530
			$order = $this->get($order['id']);
533
			$order = $this->get($order['id']);
531
			$orders[] = $order;
534
			$et["orders"][] = $order;
532
		}
535
		}
-
 
536
		$sql = "SELECT
-
 
537
				FOUND_ROWS() AS total
-
 
538
		";
-
 
539
		$res = $GLOBALS["order_db"]->query($sql);
-
 
540
		$row = $res->row_array();
-
 
541
		$ret["orderAnz"] = $row["total"];
533
		return $orders;
542
		return $ret;
534
	}
543
	}
Zeile 535... Zeile 544...
535
 
544
 
536
	public function get($id)
545
	public function get($id)
537
	{
546
	{