Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] Warning: mysql_num_rows()
Tr0k
post 15.06.2008, 13:17:27
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 15.06.2008

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


Witam! Mam problem z funkcją mysql_num_rows().

Mam taki kod:

Kod
<?php

mysql_connect('localhost','root','haslo');

$query = mysql_query("SELECT * FROM `users` WHERE `user`='".$login."' AND `pass`='".$haslo."';");
 
if(mysql_num_rows($query) == 1) {}

?>


Wywala mi takie ostrzeżenie: 

Kod
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\xampp\htdocs\test\strona\kod.php on line 6


Dodam, że kod uruchamiam xampp'em.

Proszę o pomoc w rozwiązaniu problemu.

Ten post edytował Tr0k 15.06.2008, 13:20:22
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: 31.07.2025 - 09:27