Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php+mysql] problem z mysql_query
-foxiu-
post 29.03.2005, 19:59:24
Post #1





Goście







mam bardzo dziwny problem.

Kod
//costam

    $query = "select Email from klienci where Email = '" . $_SESSION['login'] . "'";
    print $query . "<br>";
    $result = mysql_query("SELECT Email FROM klienci WHERE Email='foxiu'");
    if (!($result)) { print "Nie ma takiego usera!!"; print mysql_fetch_array($result); }
    else {
        $query1 = "select Haslo from klienci where Email=" . $_SESSION['login'];
        $result1 = mysql_query($query1);
        if (mysql_fetch_array($result1, MYSQL_ASSOC) == $_SESSION['passwd']) {
      $_SESSION['zalogowany'] = true;
      $_SESSION['udanelogowanie'] = true;
        }
    }


//cośtam


a efekt tego jest taki:

select Email from klienci where Email = 'foxiu'
Nie ma takiego usera!!
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\usr\krasnal\www\sklep\engine\login1.php on line 25

problem jest dziwny, ponieważ w całej tabeli klienci mam tylko jeden rekord, a polu Email jest foxiu...

dodam jeszcze ze w iinym kawałku kodu zapytanie typu 'select * from producenci' przechodzi, a juz 'select * from producenci where Nazwa='Abus' ' nie przechodzi, pomimo istnienia w tej tabeli producenta o nazwie Abus. wie ktoś co jest grane?
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 10:17