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 *
230 $sql = $this->_sql; 231 232 if ( ! empty($this->_parameters)) 233 { 234 // Quote all of the values 235 $values = array_map(array($db, 'quote'), $this->_parameters); 236 237 // Replace the values in the SQL 238 $sql = \Str::tr($sql, $values); 239 } 240
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
506 $regionHash = Config::get('define.area_region'); // 地方 507 $data['week'] = Config::get('define.week'); // 曜日 508 509 // 地域情報取得 510 $sql = 'SELECT * FROM m_site WHERE site_id= :site_id AND del_flg = :del_flg;'; 511 $siteHash = DB::query($sql)->bind('site_id', $site_id)->bind('del_flg', $delFlgTrue)->execute()->as_array(); 512 if (empty($siteHash) || count($siteHash) < 1) { 513 header('Location: ../select_area'); 514 exit; 515 } 516 $siteInfo = $siteHash[0];
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}