1 | <?php |
||
34 | class SqlStatements |
||
35 | { |
||
36 | |||
37 | /** |
||
38 | * This is a utility class, so protect it against direct |
||
39 | * instantiation. |
||
40 | */ |
||
41 | private function __construct() |
||
44 | |||
45 | /** |
||
46 | * This is a utility class, so protect it against cloning. |
||
47 | * |
||
48 | * @return void |
||
49 | */ |
||
50 | private function __clone() |
||
53 | |||
54 | /** |
||
55 | * The SQL statement to load an existing magic360 gallery byproduct ID and position. |
||
56 | * |
||
57 | * @var string MAGIC360_GALLERY |
||
58 | */ |
||
59 | const MAGIC360_GALLERY = 'SELECT * |
||
60 | FROM magic360_gallery |
||
61 | WHERE product_id = :product_id |
||
62 | AND position = :position'; |
||
63 | |||
64 | /** |
||
65 | * The SQL statement to load an existing magic360 column by product ID. |
||
66 | * |
||
67 | * @var string MAGIC360_COLUMNS |
||
68 | */ |
||
69 | const MAGIC360_COLUMNS = 'SELECT * |
||
70 | FROM magic360_columns |
||
71 | WHERE product_id = :product_id'; |
||
72 | |||
73 | /** |
||
74 | * The SQL statement to create a new magic360 gallery entry. |
||
75 | * |
||
76 | * @var string CREATE_MAGIC360_GALLERY |
||
77 | */ |
||
78 | const CREATE_MAGIC360_GALLERY = 'INSERT |
||
79 | INTO magic360_gallery ( |
||
80 | product_id, |
||
81 | position, |
||
82 | file |
||
83 | ) |
||
84 | VALUES (:product_id, |
||
85 | :position, |
||
86 | :file)'; |
||
87 | |||
88 | /** |
||
89 | * The SQL statement to update an existing magic360 gallery entry. |
||
90 | * |
||
91 | * @var string UPDATE_MAGIC360_GALLERY |
||
92 | */ |
||
93 | const UPDATE_MAGIC360_GALLERY = 'UPDATE magic360_gallery |
||
94 | SET product_id = :product_id, |
||
95 | position = :position, |
||
96 | file = :file |
||
97 | WHERE id = :id'; |
||
98 | |||
99 | /** |
||
100 | * The SQL statement to delete an existing magic360 gallery entry. |
||
101 | * |
||
102 | * @var string DELETE_MAGIC360_GALLERY |
||
103 | */ |
||
104 | const DELETE_MAGIC360_GALLERY = 'DELETE FROM magic360_gallery WHERE product_id = :product_id'; |
||
105 | |||
106 | /** |
||
107 | * The SQL statement to create a new magic360 column entry. |
||
108 | * |
||
109 | * @var string CREATE_MAGIC360_COLUMNS |
||
110 | */ |
||
111 | const CREATE_MAGIC360_COLUMNS = 'INSERT |
||
112 | INTO magic360_columns ( |
||
113 | product_id, |
||
114 | columns |
||
115 | ) |
||
116 | VALUES (:product_id, |
||
117 | :columns)'; |
||
118 | |||
119 | /** |
||
120 | * The SQL statement to update an existing magic360 column entry. |
||
121 | * |
||
122 | * @var string UPDATE_MAGIC360_COLUMNS |
||
123 | */ |
||
124 | const UPDATE_MAGIC360_COLUMNS = 'UPDATE magic360_columns |
||
125 | SET product_id = :product_id, |
||
126 | columns = :columns |
||
127 | WHERE product_id = :product_id'; |
||
128 | |||
129 | /** |
||
130 | * The SQL statement to update an existing magic360 column entry. |
||
131 | * |
||
132 | * @var string DELETE_MAGIC360_COLUMNS |
||
133 | */ |
||
134 | const DELETE_MAGIC360_COLUMNS = 'DELETE FROM magic360_columns WHERE product_id = :product_id'; |
||
135 | } |
||
136 |