Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z zapytaniem mysql
Throx
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 17.02.2012

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


Witam. Robię prosty skrypt odpowiedzialny za logowanie, jednak mam błąd:
Kod
Query failed: 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 'WHERE username=Throx and user_password=207023ccb44feb4d7dadca005ce29a64' at line 1


Kod:
  1. $login = $_POST["username"];
  2. $haslo = $_POST["user_password"];
  3.  
  4. $haslo = md5($haslo);
  5.  
  6. $wynik=mysql_query("SELECT `username`,`user_password` FROM $phpbb_users WHERE
  7. username=$login and user_password=$haslo") or die('Query failed: ' . mysql_error() . "<br />\n$sql");


Prosiłbym o pomoc w rozwiązaniu problemu.

Ten post edytował Throx 17.02.2012, 21:01:11
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Throx
post
Post #2





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 17.02.2012

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


Tak też już miałem, niestety nic to nie daje.
Go to the top of the page
+Quote Post
phpowiec84
post
Post #3





Grupa: Zarejestrowani
Postów: 101
Pomógł: 2
Dołączył: 10.12.2010

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


Cytat(Throx @ 17.02.2012, 21:20:14 ) *
Tak też już miałem, niestety nic to nie daje.


ależ daje napewno ...
zwraca błąd który wstawiony tutaj już na początku rozwiązałby problem ...
Go to the top of the page
+Quote Post
Throx
post
Post #4





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 17.02.2012

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


Cytat(phpowiec84 @ 17.02.2012, 21:22:04 ) *
ależ daje napewno ...
zwraca błąd który wstawiony tutaj już na początku rozwiązałby problem ...

Zwraca (prawie) taki sam błąd, jak poprzednio:
Kod
Query failed: 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 'WHERE username='Throx' AND user_password='207023ccb44feb4d7dadca005ce29a64'' at line 1
Go to the top of the page
+Quote Post

Posty w temacie


Closed TopicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 15.10.2025 - 10:00