Fuel\Core\Database_Exception [ 1040 ]:
SQLSTATE[HY000] [1040] Too many connections
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))
608 { 609 // Convert to non-locale aware float to prevent possible commas 610 return sprintf('%F', $value); 611 } 612 613 return $this->escape($value); 614 } 615 616 /** 617 * Quote a database table name and adds the table prefix if needed. 618 *
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();
1376 $this->limit = 1; 1377 $this->rows_limit = null; 1378 } 1379 1380 // get the result using normal find 1381 $result = $this->get(); 1382 1383 // put back the old limits 1384 $this->limit = $limit; 1385 $this->rows_limit = $rows_limit; 1386
579 foreach(static::primary_key() as $pk) 580 { 581 $query->order_by($pk, $id == 'first' ? 'ASC' : 'DESC'); 582 } 583 584 return $query->get_one(); 585 } 586 587 // Return specific request row by ID 588 else 589 {
316 $siteTypeArr = Config::get('define.site_type'); // 観光地タイプ 317 318 // 市区町村データの取得 319 $m_municipalit = Model_M_Municipalit::find('first', array( 320 'where' => array( 321 array('municipalit_id', $municipalit_id), 322 ), 323 )); 324 325 if (empty($m_municipalit)) { 326 header('Location: ./select_area');
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');
66 $response = Response::forge($response); 67 } 68 } 69 elseif ($e === false) 70 { 71 $response = Request::forge()->execute()->response(); 72 } 73 elseif ($route) 74 { 75 $response = Request::forge($route, false)->execute(array($e))->response(); 76 }
87{ 88 // Boot the app... 89 require APPPATH.'bootstrap.php'; 90 91 // ... and execute the main request 92 $response = $routerequest(); 93} 94catch (HttpBadRequestException $e) 95{ 96 $response = $routerequest('_400_', $e); 97}