PluginProbe
Tutor LMS – eLearning and online course solution / 3.7.3
Tutor LMS – eLearning and online course solution v3.7.3
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 3.9.15 3.9.14 3.9.13 3.9.12 3.9.11 trunk 1.0.0 1.0.0-alpha 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 All 191 releases
← All changes | models/BaseModel.php +3 -3 4.0.53.7.3 View file →
@@ -179,9 +179,9 @@
179 179 *
180 180 * @return array
181 181 */
182 182 public function get_col( $column_name, $where ) {
183 - $where_clause = count( $where ) ? 'WHERE ' . QueryHelper::prepare_where_clause( $where ) : '';
183 + $where_clause = count( $where ) ? 'WHERE ' . QueryHelper::build_where_clause( $where ) : '';
184 184 $query = $this->db->prepare( "SELECT {$column_name} FROM {$this->table_name} {$where_clause}" );
185 185
186 186 return $this->db->get_col( $query );
187 187 }
@@ -234,14 +234,14 @@
234 234 }
235 235
236 236 if ( isset( $args['where'] ) && is_array( $args['where'] ) ) {
237 237 $where = $args['where'];
238 - $where_clause = count( $where ) ? 'WHERE ' . QueryHelper::prepare_where_clause( $where ) : '';
238 + $where_clause = count( $where ) ? 'WHERE ' . QueryHelper::build_where_clause( $where ) : '';
239 239 }
240 240
241 241 if ( isset( $args['search'] ) && is_array( $args['search'] ) ) {
242 242 if ( count( $args['search'] ) ) {
243 - $where_clause .= ( empty( $where_clause ) ? 'WHERE ' : ' AND ' ) . QueryHelper::prepare_like_clause( $args['search'], 'AND' );
243 + $where_clause .= ( empty( $where_clause ) ? 'WHERE ' : ' AND ' ) . QueryHelper::build_like_clause( $args['search'], 'AND' );
244 244 }
245 245 }
246 246
247 247 $orderby = $args['orderby'] ?? $this->primary_key;