@@ -38,7 +38,9 @@ |
||
| 38 | 38 | $query = "UPDATE ".$this->table()." SET "; |
| 39 | 39 | foreach($row as $key => $val){ |
| 40 | 40 | $ar[':'.$key] = $val; |
| 41 | - if($key == 'id') continue; |
|
| 41 | + if($key == 'id') { |
|
| 42 | + continue; |
|
| 43 | + } |
|
| 42 | 44 | $query.= $qb->quote($key)." =:".$key.","; |
| 43 | 45 | } |
| 44 | 46 | |
@@ -50,16 +50,16 @@ |
||
| 50 | 50 | return $destination; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * Turn the stadClass object to the type of calling Model |
|
| 55 | - * |
|
| 56 | - * @param String $destination |
|
| 57 | - * @param Object $sourceObject |
|
| 58 | - * @return Object $destination |
|
| 59 | - * |
|
| 60 | - * @author RN Kushwaha <[email protected]> |
|
| 61 | - * @since v0.0.5 |
|
| 62 | - */ |
|
| 53 | + /** |
|
| 54 | + * Turn the stadClass object to the type of calling Model |
|
| 55 | + * |
|
| 56 | + * @param String $destination |
|
| 57 | + * @param Object $sourceObject |
|
| 58 | + * @return Object $destination |
|
| 59 | + * |
|
| 60 | + * @author RN Kushwaha <[email protected]> |
|
| 61 | + * @since v0.0.5 |
|
| 62 | + */ |
|
| 63 | 63 | public function turnObjects($destination, $data) |
| 64 | 64 | { |
| 65 | 65 | $destination = new $destination(); |
@@ -13,11 +13,11 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class WhereQueryBuilder extends QueryBuilder |
| 15 | 15 | { |
| 16 | - private $qb; |
|
| 16 | + private $qb; |
|
| 17 | 17 | |
| 18 | - public function __construct(){ |
|
| 18 | + public function __construct(){ |
|
| 19 | 19 | $this->qb = new QueryBuilder(); |
| 20 | - } |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | 22 | protected function prepareArrayForWhere($bindKey, $bindVal = null){ |
| 23 | 23 | $ar = $conditionAr = array(); |