Fuel\Core\Database_Exception [ 2002 ]:
Connection refused
117 } 118 } 119 if ($this->_connection->error) 120 { 121 // Unable to connect, select database, etc 122 throw new \Database_Exception(str_replace($password, str_repeat('*', 10), $this->_connection->error), $this->_connection->errno); 123 } 124 } 125 catch (\ErrorException $e) 126 { 127 // No connection exists
233 throw new \Database_Exception($this->_connection->error.' [ '.$sql.' ]', $this->_connection->errno); 234 } 235 } 236 else 237 { 238 $this->connect(); 239 } 240 241 if (\Fuel::$profiling and ! empty($this->_config['profiling'])) 242 { 243 // Get the paths defined in config
309 catch (\CacheNotFoundException $e) {} 310 } 311 312 // Execute the query 313 \DB::$query_count++; 314 $result = $db->query($this->_type, $sql, $this->_as_object); 315 316 // Cache the result if needed 317 if (isset($cache) and ($this->_cache_all or $result->count())) 318 { 319 $cache->set_expiration($this->_lifetime)->set_contents($result->as_array())->set();
49 * @throws AppException 50 */ 51 public function query($q) { 52 return \Fuel\Core\DB::query($q) 53 ->as_object('stdClass') 54 ->execute($this->dbName) 55 ->as_array(); 56 } 57 58 // rahul code 59 public static function sumOdigit($num){
71 * 72 * @return bool|mixed 73 * @throws AppException 74 */ 75 public function queryOne($q) { 76 $data = $this->query($q); 77 78 return count($data) ? $data[0] : false; 79 } 80 81 /**
287 $brandSlug= preg_replace('/[^A-Za-z0-9\-]/', '', $segmen[1]); 288 if($brandSlug=='phpinfo'){ 289 phpinfo(); 290 291 }else{ 292 $cat_id = Db::getInstance('controlroom')->queryOne(" SELECT category_id FROM tbl_category_master where category_caption='$brandSlug' "); 293 if($brandSlug) { 294 $slug = Db::getInstance()->queryOne(" 295 select 296 table_name 297 from tbl_slug_master sm where 1
447 ->trigger('controller_started', '', 'none'); 448 449 $class->hasMethod('before') and $class->getMethod('before') 450 ->invoke($this->controller_instance); 451 452 $response = $action->invokeArgs($this->controller_instance, $this->method_params); 453 454 $class->hasMethod('after') and $response = $class->getMethod('after') 455 ->invoke($this->controller_instance, $response); 456 457 // fire any controller finished events
62 if(!$response instanceof Response) { 63 $response = Response::forge($response); 64 } 65 } elseif($e === false) { 66 $response = Request::forge() 67 ->execute() 68 ->response(); 69 } elseif($route) { 70 $response = Request::forge($route, false) 71 ->execute([$e]) 72 ->response();
82try { 83 // Boot the app... 84 require APPPATH . 'bootstrap.php'; 85 86 // ... and execute the main request 87 $response = $routerequest(); 88} catch(HttpNoAccessException $e) { 89 $response = $routerequest('_403_', $e); 90} catch(HttpNotFoundException $e) { 91 $response = $routerequest('_404_', $e); 92} catch(HttpServerErrorException $e) {