<?php

class CSTicketHelper {

	//=========================================
	//
	//	THIS CLASS IS STATIC ONLY
	//
	//=========================================
	private function __construct() {}

	private function __clone() {}

	//=========================================
	//
	//	THE PUBLIC INTERFACE
	//
	//=========================================

	public static function get_tickets_by_ids($ids) {
		$db = Registry::get('base')->db;

		$sql = "SELECT
					*
				FROM
					tickets
				WHERE
					order_id
				IN
					(".$db->real_escape_string($ids).")";

		$result = $db->query($sql);

		if ($result->num_rows > 0) {
			while ($obj = $result->fetch_object()) {
				$return[] = $obj;
			}

			return $return;
		}

		return false;
	}
}