Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [DIY] Błąd w (mysql_num_rows ($result));
sigal2006
post
Post #1





Grupa: Zarejestrowani
Postów: 71
Pomógł: 0
Dołączył: 17.02.2010

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


SKrypt wywala mi błąd

  1. Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/qq134990/public_html/hoopa.pl/admin/include/function.php on line 38


Sprawdziłem i dane do sql są oki linijka 38 to
  1. return (mysql_num_rows ($result));


częśc pliku function.php
  1. $nazwa_sesji='pad_ogloszenia';
  2.  
  3. function connection() {
  4. global $conn;
  5.  
  6. include('config.php');
  7.  
  8. if ($conn)
  9. return $conn;
  10. else {
  11. $conn = mysql_connect ($mysql_host, $mysql_base, $mysql_pass);
  12. if (!$conn || !mysql_select_db ($mysql_users, $conn))
  13. return 0;
  14. else
  15. return $conn;
  16. }
  17. }
  18.  
  19. function query ($sqlquery) {
  20. if (!($conn = connection ()))
  21. return 0;
  22. else {
  23. $result = mysql_query ($sqlquery, $conn);
  24. if (!$result)
  25. echo "Błąd w zapytaniu!";
  26. else
  27. return $result;
  28. }
  29. }
  30.  
  31. function next_record ($result) {
  32. $ans = mysql_fetch_row ($result);
  33. return $ans;
  34. }
  35.  
  36. function records_qty ($result) {
  37. return (mysql_num_rows ($result));
  38. }
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: 29.09.2025 - 13:13