Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][MySQL]Wyświetlenie zapytania
woxala123
post
Post #1





Grupa: Zarejestrowani
Postów: 361
Pomógł: 12
Dołączył: 9.01.2010

Ostrzeżenie: (10%)
X----


Witam
Mam taki kod
  1. $sql = 'SELECT id, email FROM users WHERE email = :email';
  2. $statement = $pdo->prepare($sql);
  3. $email = filter_input(INPUT_GET, 'email');
  4. $statement->bindValue(':email', $email, PDO::PARAM_INT);
  5. $statement->execute();
  6. // Iterate results
  7. while (($result = $statement->fetch(PDO::FETCH_ASSOC)) !== false) {
  8. echo $result['email'];
  9. }

I w lini gdzie jest warunek email=:email nie wyświetlają się userzy a gdy zrobię email=email to się pokazują. Od czego to zależy.?
Pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
viking
post
Post #2





Grupa: Zarejestrowani
Postów: 6 381
Pomógł: 1116
Dołączył: 30.08.2006

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


email raczej longiem nie jest, tak? A to robi php wewnętrznie.
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: 6.10.2025 - 18:40