Initial import: Carteasy Shop (Dev-Stand)
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user