Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Nie oczekujący błąd
pawel06281990
post
Post #1





Grupa: Zarejestrowani
Postów: 298
Pomógł: 0
Dołączył: 10.01.2014

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


Witam,

Nie wiem dla czego pokazał mi się taki błąd

  1. Warning: mysqli_query() expects parameter 1 to be mysqli, string given in /home/twojhost/public_html/panel/funkcje.php on line 108
  2.  
  3. Warning: mysqli_error() expects parameter 1 to be mysqli, string given in /home/twojhost/public_html/panel/funkcje.php on line 110


To jest funkcja łączenia i zapisu mysqli działała mi to a teraz o coś mu chodzi ale nie wiem o co.

To moja funkcja

  1. function dbquery($link,$query) {
  2. $result = mysqli_query($link, $query);
  3. if (!$result) {
  4. echo mysqli_error($link);
  5. return false;
  6. } else {
  7. return($result);
  8. }
  9. }


A tak łącze sie z bazą danych

  1. $link = mysqli_connect($db_host, $db_user, $db_pass, $db_name);


O co mu chodzi. Proszę pomuszcie
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: 2.10.2025 - 22:43