diff options
author | Jamie Matthews <[email protected]> | 2010-09-14 03:35:28 +0100 |
---|---|---|
committer | Jamie Matthews <[email protected]> | 2010-09-14 03:35:28 +0100 |
commit | 80c5136a539050896aa2901abcd91766d622f1e6 (patch) | |
tree | f24705d62a1a7a9b6a87047fcc2d1dc2b99d4b03 /idiorm.php | |
parent | aac5215d4dd3ac410e782c5a8708dca9318e9e6e (diff) |
Remove some pointless class constants
Diffstat (limited to 'idiorm.php')
-rw-r--r-- | idiorm.php | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -46,10 +46,6 @@ // --- CLASS CONSTANTS --- // // ----------------------- // - // Select WHERE operators - const EQUALS = '='; - const LIKE = 'LIKE'; - // Find types const FIND_ONE = 0; const FIND_MANY = 1; @@ -59,10 +55,6 @@ const UPDATE = 0; const INSERT = 1; - // Order by - const ASC = 'ASC'; - const DESC = 'DESC'; - // Order by array keys const ORDER_BY_COLUMN_NAME = 0; const ORDER_BY_ORDERING = 1; @@ -339,14 +331,14 @@ * Can be used if preferred. */ public function where_equals($column_name, $value) { - return $this->add_where($column_name, $value, self::EQUALS); + return $this->add_where($column_name, $value, '='); } /** * Add a WHERE ... LIKE clause to your query. */ public function where_like($column_name, $value) { - return $this->add_where($column_name, $value, self::LIKE); + return $this->add_where($column_name, $value, 'LIKE'); } @@ -393,14 +385,14 @@ * Add an ORDER BY column DESC clause */ public function order_by_desc($column_name) { - return $this->add_order_by($column_name, self::DESC); + return $this->add_order_by($column_name, 'DESC'); } /** * Add an ORDER BY column ASC clause */ public function order_by_asc($column_name) { - return $this->add_order_by($column_name, self::ASC); + return $this->add_order_by($column_name, 'ASC'); } /** |