Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][MySQL]@ w zmiennej - zapytanie do bazy
php11
post
Post #1





Grupa: Zarejestrowani
Postów: 215
Pomógł: 5
Dołączył: 11.02.2011

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


Cześć,

tworzę zapytanie do mysql - pobieram dane,
Gdy testuję jest ok:

  1. ->where('email = "adres@mejlowy.pl"');


ale, gdy chcę podać konkretny mejl - już nie:

  1. $mejl = 'adres@mejlowy.pl';
  2. ->where('email = ' . $mejl);


Otrzymuję komunikat: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@mejlowy.pl'

Pomożecie?
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 - 06:55