Fuel\Core\Database_Exception [ 2002 ]:
107 else 108 { 109 $error_code = 0; 110 } 111 } 112 throw new \Database_Exception(str_replace($this->_config['connection']['password'], str_repeat('*', 10), $e->getMessage()), $error_code, $e); 113 } 114 } 115 116 /** 117 * @return bool
442 * @return string 443 */ 444 public function escape($value) 445 { 446 // Make sure the database is connected 447 $this->_connection or $this->connect(); 448 449 $result = $this->_connection->quote($value); 450 451 // poor-mans workaround for the fact that not all drivers implement quote() 452 if (empty($result))
612 { 613 // Convert to non-locale aware float to prevent possible commas 614 return sprintf('%F', $value); 615 } 616 617 return $this->escape($value); 618 } 619 620 /** 621 * Quote a database table name and adds the table prefix if needed. 622 *
131 // Set the parameter as the value 132 $value = $this->_parameters[$value]; 133 } 134 135 // Quote the entire value normally 136 $value = $db->quote($value); 137 } 138 139 // Append the statement to the query 140 $sql .= $db->quote_identifier($column).' '.$op.' '.$value; 141 }
437 } 438 439 if ( ! empty($this->_where)) 440 { 441 // Add selection conditions 442 $query .= ' WHERE '.$this->_compile_conditions($db, $this->_where); 443 } 444 445 if ( ! empty($this->_group_by)) 446 { 447 // Add sorting
263 // Database_Query_Builder_Select then use the slave connection if configured 264 $db = \Database_Connection::instance($db, null, ! $this instanceof \Database_Query_Builder_Select); 265 } 266 267 // Compile the SQL query 268 $sql = $this->compile($db); 269 270 // make sure we have a SQL type to work with 271 if (is_null($this->_type)) 272 { 273 // get the SQL statement type without having to duplicate the entire statement
1299 } 1300 $ref = $values; 1301 } 1302 } 1303 1304 $rows = $query->execute($this->connection)->as_array(); 1305 1306 // To workaround the PHP 5.x performance issue at pulling a large number of records, 1307 // we shouldn't use passing array by reference directly here. 1308 $result = new \stdClass; 1309 $result->data = array();
44 * Make sure the soft-filter is added to get() calls 45 */ 46 public function get() 47 { 48 $this->add_soft_filter(); 49 return parent::get(); 50 } 51 52 /** 53 * Make sure the soft-filter is added to count() calls 54 */
566 } 567 568 // Return all that match $options array 569 elseif ($id === 'all') 570 { 571 return static::query($options)->get(); 572 } 573 574 // Return first or last row that matches $options array 575 elseif ($id === 'first' or $id === 'last') 576 {
18 $viewParams = []; 19 switch ($type) { 20 case 'set': 21 $viewParams = [ 22 'type' => ORDER_TYPE_KIMONO_A, 23 'kijis' => Model_KimonoAttribute::find('all', ['where' => [['deleted_at', null], ['is_not_selling', 0], ['type', KIMONO_ATTRIBUTE_TYPE_STR_KIJI]], 'order_by' => ['sort_order' => 'asc']]), 24 'somes' => Model_KimonoAttribute::find('all', ['where' => [['deleted_at', null], ['is_not_selling', 0], ['type', KIMONO_ATTRIBUTE_TYPE_STR_SOME]], 'order_by' => ['sort_order' => 'asc']]), 25 'nagajubans' => Model_KimonoAttribute::find('all', ['where' => [['deleted_at', null], ['is_not_selling', 0], ['type', KIMONO_ATTRIBUTE_TYPE_STR_NAGAJUBAN]], 'order_by' => ['sort_order' => 'asc']]), 26 'obis' => Model_KimonoAttribute::find('all', ['where' => [['deleted_at', null], ['is_not_selling', 0], ['type', KIMONO_ATTRIBUTE_TYPE_STR_OBI]], 'order_by' => ['sort_order' => 'asc']]), 27 'obijimes' => Model_KimonoAttribute::find('all', ['where' => [['deleted_at', null], ['is_not_selling', 0], ['type', KIMONO_ATTRIBUTE_TYPE_STR_OBIJIME]], 'order_by' => ['sort_order' => 'asc']]), 28 'obiages' => Model_KimonoAttribute::find('all', ['where' => [['deleted_at', null], ['is_not_selling', 0], ['type', KIMONO_ATTRIBUTE_TYPE_STR_OBIAGE]], 'order_by' => ['sort_order' => 'asc']]),
449 // fire any controller started events 450 \Event::instance()->has_events('controller_started') and \Event::instance()->trigger('controller_started', '', 'none'); 451 452 $class->hasMethod('before') and $class->getMethod('before')->invoke($this->controller_instance); 453 454 $response = $action->invokeArgs($this->controller_instance, $this->method_params); 455 456 $class->hasMethod('after') and $response = $class->getMethod('after')->invoke($this->controller_instance, $response); 457 458 // fire any controller finished events 459 \Event::instance()->has_events('controller_finished') and \Event::instance()->trigger('controller_finished', '', 'none');
69 $response = Response::forge($response); 70 } 71 } 72 elseif ($e === false) 73 { 74 $response = Request::forge()->execute()->response(); 75 } 76 elseif ($route) 77 { 78 $response = Request::forge($route, false)->execute(array($e))->response(); 79 }
94{ 95 // Boot the app... 96 require APPPATH.'bootstrap.php'; 97 98 // ... and execute the main request 99 $response = $routerequest(); 100} 101catch (HttpBadRequestException $e) 102{ 103 $response = $routerequest('_400_', $e); 104}