Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [SQL][PHP] Kilka błędów w skrypcie
bartus2003
post
Post #1





Grupa: Zarejestrowani
Postów: 19
Pomógł: 0
Dołączył: 2.12.2009

Ostrzeżenie: (0%)
-----


Witajcie, postanowiłem się trochę pobawić pewnym skryptem
Kiedy debugowanie w nim jest ustawione na 1 pokazuje się czasem takowy błąd:

  1. Query: SELECT `User`.`id`, `User`.`username`, `User`.`hashed_password`, `User`.`email`, `User`.`rank`, `User`.`token`, `User`.`created`, `User`.`updated`, `User`.`language`, `User`.`firstname`, `User`.`lastname`, `User`.`gender`, `User`.`photos`, `User`.`birthday`, `User`.`hidden`, `User`.`location`, `User`.`photo_id`, `User`.`phone`, `User`.`gg`, `User`.`skype`, `User`.`msn`, `User`.`aim`, `User`.`jabber`, `User`.`photo_secret`, `User`.`last_public_photo`, `User`.`friends`, `User`.`email_messages_notification`, `User`.`photos_limit`, `User`.`slideshows`, `User`.`last_public_slideshow`, `User`.`last_friend_photo`, `User`.`last_friend_slideshow`, `User`.`privacy` FROM `fociki_users` AS `User` WHERE `User`.`username` = '�*�Cm' AND `z ` = '����(�b����m02���FB+���c' LIMIT 1
  2.  
  3. Warning (512): SQL Error: 1054: Unknown column 'z
  4. ' in 'where clause' [CORE/cake/libs/model/datasources/dbo_source.php, line 440]
  5.  
  6. Context | Code
  7.  
  8. $sql = "SELECT `User`.`id`, `User`.`username`, `User`.`hashed_password`, `User`.`email`, `User`.`rank`, `User`.`token`, `User`.`created`, `User`.`updated`, `User`.`language`, `User`.`firstname`, `User`.`lastname`, `User`.`gender`, `User`.`photos`, `User`.`birthday`, `User`.`hidden`, `User`.`location`, `User`.`photo_id`, `User`.`phone`, `User`.`gg`, `User`.`skype`, `User`.`msn`, `User`.`aim`, `User`.`jabber`, `User`.`photo_secret`, `User`.`last_public_photo`, `User`.`friends`, `User`.`email_messages_notification`, `User`.`photos_limit`, `User`.`slideshows`, `User`.`last_public_slideshow`, `User`.`last_friend_photo`, `User`.`last_friend_slideshow`, `User`.`privacy` FROM `fotencja_users` AS `User` WHERE `User`.`username` = '�*�Cm' AND `z
  9. ` = '����(�b����m02���FB+���c' LIMIT 1"
  10. $error = "1054: Unknown column 'z
  11. ' in 'where clause'"
  12.  
  13.  
  14. if (($this->debug || $error) && Configure::read() > 0) {
  15.  
  16.  
  17. e("<p style = \"text-align:left\"><b>Query:</b> {$sql} ");
  18.  
  19.  
  20. if ($error) {
  21.  
  22.  
  23. trigger_error("<span style = \"color:Red;text-align:left\"><b>SQL Error:</b> {$this->error}</span>", E_USER_WARNING);
  24.  
  25.  
  26. } else {
  27.  
  28. DboSource::showQuery() - CORE/cake/libs/model/datasources/dbo_source.php, line 440
  29. DboSource::execute() - CORE/cake/libs/model/datasources/dbo_source.php, line 166
  30. DboSource::fetchAll() - CORE/cake/libs/model/datasources/dbo_source.php, line 297
  31. DboSource::read() - CORE/cake/libs/model/datasources/dbo_source.php, line 571
  32. Model::find() - CORE/cake/libs/model/model.php, line 1502
  33. DboSource::query() - CORE/cake/libs/model/datasources/dbo_source.php, line 252
  34. Model::call__() - CORE/cake/libs/model/model.php, line 507
  35. Overloadable::__call() - CORE/cake/libs/overloadable_php5.php, line 59
  36. User::findByUsernameAndHashedPassword() - [internal], line (IMG:style_emoticons/default/questionmark.gif)
  37. AppController::beforeFilter() - CORE/app/app_controller.php, line 105
  38. Dispatcher::start() - CORE/cake/dispatcher.php, line 320
  39. Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 234
  40. require - CORE/app/webroot/index.php, line 85
  41. [main] - CORE/index.php, line 63
  42.  
  43. Warning (2): Cannot modify header information - headers already sent by (output started at /srv/home/m92995my/public_html/fotencja/cake/basics.php:919) [CORE/cake/libs/controller/components/cookie.php, line 399]
  44.  
  45. Context | Code
  46.  
  47. $name = "[User][username]"
  48.  
  49.  
  50. * @access private
  51.  
  52.  
  53. */
  54.  
  55.  
  56. function __delete($name) {
  57.  
  58.  
  59. setcookie($this->name . $name, '', time() - 42000, $this->path, $this->domain, $this->secure);
  60.  
  61.  
  62. }
  63.  
  64. CookieComponent::__delete() - CORE/cake/libs/controller/components/cookie.php, line 399
  65. CookieComponent::del() - CORE/cake/libs/controller/components/cookie.php, line 302
  66. UsersController::kill_user() - CORE/app/controllers/users_controller.php, line 385
  67. UsersController::signin() - CORE/app/controllers/users_controller.php, line 341
  68. Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 276
  69. Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 248
  70. require - CORE/app/webroot/index.php, line 85
  71. [main] - CORE/index.php, line 63
  72.  
  73. Warning (2): Cannot modify header information - headers already sent by (output started at /srv/home/m92995my/public_html/fotencja/cake/basics.php:919) [CORE/cake/libs/controller/components/cookie.php, line 384]
  74.  
  75. Context | Code
  76.  
  77. $name = "[User][username]"
  78. $value = "admin"
  79.  
  80.  
  81. * @access private
  82.  
  83.  
  84. */
  85.  
  86.  
  87. function __write($name, $value) {
  88.  
  89.  
  90. setcookie($this->name . "$name", $this->__encrypt($value), $this->__expires, $this->path, $this->domain, $this->secure);
  91.  
  92.  
  93.  
  94. CookieComponent::__write() - CORE/cake/libs/controller/components/cookie.php, line 384
  95. CookieComponent::write() - CORE/cake/libs/controller/components/cookie.php, line 230
  96. UsersController::signin() - CORE/app/controllers/users_controller.php, line 364
  97. Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 276
  98. Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 248
  99. require - CORE/app/webroot/index.php, line 85
  100. [main] - CORE/index.php, line 63
  101.  
  102. Warning (2): Cannot modify header information - headers already sent by (output started at /srv/home/m92995my/public_html/fotencja/cake/basics.php:919) [CORE/cake/libs/controller/controller.php, line 503]
  103.  
  104. Context | Code
  105.  
  106. $this = array("name" => "Users", "uses" => array, "paginate" => array, "components" => array, "helpers" => array, "here" => "/index.php/signin", "webroot" => "/app/webroot/", "action" => "signin", "params" => array, "data" => array, "viewPath" => "users", "layoutPath" => null, "viewVars" => array, "pageTitle" => false, "modelNames" => array, "base" => "/index.php", "layout" => "default", "autoRender" => false, "autoLayout" => true, "view" => "View", "ext" => ".ctp", "__viewClass" => null, "output" => null, "plugin" => null, "cacheAction" => false, "persistModel" => false, "webservices" => null, "passedArgs" => array, "_log" => null, "modelClass" => "User", "modelKey" => "user", "Email" => array, "Cookie" => array, "RequestHandler" => array, "Session" => array, "User" => array, "Photo" => array, "Friend" => array, "PhotoComment" => array, "Invitation" => array, "Slideshow" => array, "menu" => array, "user_menu" => array)
  107. $url = "/"
  108. $status = null
  109. $exit = false
  110. $c = "Session"
  111. $path = array(0 => "Session")
  112. $resp = null
  113.  
  114.  
  115. header($status);
  116.  
  117.  
  118. }
  119.  
  120.  
  121. if ($url !== null) {
  122.  
  123.  
  124. header('Location: ' . Router::url($url, true));
  125.  
  126.  
  127. }
  128.  
  129. Controller::redirect() - CORE/cake/libs/controller/controller.php, line 503
  130. UsersController::signin() - CORE/app/controllers/users_controller.php, line 367
  131. Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 276
  132. Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 248
  133. require - CORE/app/webroot/index.php, line 85
  134. [main] - CORE/index.php, line 63


Jak sobie z tym poradzić?? (IMG:style_emoticons/default/wstydnis.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 14:08