Fuel\Core\Database_Exception [ 42000 ]:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 with query: "SELECT meta_value FROM lab_postmeta WHERE meta_key = '_wp_attached_file' AND post_id = (SELECT `meta_value` FROM `lab_usermeta` WHERE `meta_key`="lab_user_avatar" AND `user_id`=)"
229 // other database error, cleanup the profiler 230 isset($benchmark) and \Profiler::delete($benchmark); 231 232 // and convert the exception in a database exception 233 $error_code = is_numeric($e->getCode()) ? $e->getCode() : 0; 234 throw new \Database_Exception($e->getMessage().' with query: "'.$sql.'"', $error_code, $e); 235 } 236 } 237 238 // no more attempts left, bail out 239 else
282 catch (CacheNotFoundException $e) {} 283 } 284 285 // Execute the query 286 \DB::$query_count++; 287 $result = $db->query($this->_type, $sql, $this->_as_object); 288 289 // Cache the result if needed 290 if (isset($cache) and ($this->_cache_all or $result->count())) 291 { 292 $cache->set_expiration($this->_lifetime)->set_contents($result->as_array())->set();
54 { 55 $results = \DB::select('meta_value'); 56 $results->from('lab_postmeta') 57 ->where('meta_key','=','_wp_attached_file') 58 ->and_where('post_id','=', DB::expr('(SELECT `meta_value` FROM `lab_usermeta` WHERE `meta_key`="lab_user_avatar" AND `user_id`=' . $authorId .')')); 59 $results = $results->execute('claso_lab')->current(); 60 return $results; 61 } 62 63// 著者IDから著者ニックネーム(表示名)を取得 64 public static function get_authors_name($authorId)
50 //パラメータでauther(著者)ID取得 51 $authorId = \Input::get('author'); 52 $data['authorId'] = $authorId; 53 54 //プロフィール写真URLを取得 55 $authors_img = \Model_Clasolab_Contents::get_authors_image($authorId); 56 $data['authors_img'] = $authors_img['meta_value']; 57 58 //著者プロフィール情報を取得 59 $authors_desc = \Model_Clasolab_Contents::get_authors_desc($authorId); 60 $data['authors_desc'] = $authors_desc['meta_value'];
439 // fire any controller started events 440 \Event::instance()->has_events('controller_started') and \Event::instance()->trigger('controller_started', '', 'none'); 441 442 $class->hasMethod('before') and $class->getMethod('before')->invoke($this->controller_instance); 443 444 $response = $action->invokeArgs($this->controller_instance, $this->method_params); 445 446 $class->hasMethod('after') and $response = $class->getMethod('after')->invoke($this->controller_instance, $response); 447 448 // fire any controller finished events 449 \Event::instance()->has_events('controller_finished') and \Event::instance()->trigger('controller_finished', '', 'none');
44require APPPATH.'bootstrap.php'; 45 46// Generate the request, execute it and send the output. 47try 48{ 49 $response = Request::forge()->execute()->response(); 50} 51catch (HttpNotFoundException $e) 52{ 53 \Request::reset_request(true); 54