Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [SQL][PHP] Kilka błędów w skrypcie
Forum PHP.pl > Forum > Przedszkole
bartus2003
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 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. setcookie - [internal], line questionmark.gif
  65. CookieComponent::__delete() - CORE/cake/libs/controller/components/cookie.php, line 399
  66. CookieComponent::del() - CORE/cake/libs/controller/components/cookie.php, line 302
  67. UsersController::kill_user() - CORE/app/controllers/users_controller.php, line 385
  68. UsersController::signin() - CORE/app/controllers/users_controller.php, line 341
  69. Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 276
  70. Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 248
  71. require - CORE/app/webroot/index.php, line 85
  72. [main] - CORE/index.php, line 63
  73.  
  74. 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]
  75.  
  76. Context | Code
  77.  
  78. $name = "[User][username]"
  79. $value = "admin"
  80.  
  81.  
  82. * @access private
  83.  
  84.  
  85. */
  86.  
  87.  
  88. function __write($name, $value) {
  89.  
  90.  
  91. setcookie($this->name . "$name", $this->__encrypt($value), $this->__expires, $this->path, $this->domain, $this->secure);
  92.  
  93.  
  94.  
  95. setcookie - [internal], line questionmark.gif
  96. CookieComponent::__write() - CORE/cake/libs/controller/components/cookie.php, line 384
  97. CookieComponent::write() - CORE/cake/libs/controller/components/cookie.php, line 230
  98. UsersController::signin() - CORE/app/controllers/users_controller.php, line 364
  99. Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 276
  100. Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 248
  101. require - CORE/app/webroot/index.php, line 85
  102. [main] - CORE/index.php, line 63
  103.  
  104. 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]
  105.  
  106. Context | Code
  107.  
  108. $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)
  109. $url = "/"
  110. $status = null
  111. $exit = false
  112. $c = "Session"
  113. $path = array(0 => "Session")
  114. $resp = null
  115.  
  116.  
  117. header($status);
  118.  
  119.  
  120. }
  121.  
  122.  
  123. if ($url !== null) {
  124.  
  125.  
  126. header('Location: ' . Router::url($url, true));
  127.  
  128.  
  129. }
  130.  
  131. header - [internal], line questionmark.gif
  132. Controller::redirect() - CORE/cake/libs/controller/controller.php, line 503
  133. UsersController::signin() - CORE/app/controllers/users_controller.php, line 367
  134. Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 276
  135. Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 248
  136. require - CORE/app/webroot/index.php, line 85
  137. [main] - CORE/index.php, line 63


Jak sobie z tym poradzić?? wstydnis.gif
blooregard
  1. AND `z ` = '

O to Ci chodzi?. Po 'z' jest spacja.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.