Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> problem z pobraniem danych z BD z wordpress
eremen
post
Post #1





Grupa: Zarejestrowani
Postów: 69
Pomógł: 0
Dołączył: 15.02.2012
Skąd: Głogów - Opole

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


edit:(caly plugin)
function Wypisz(){
$db = new mysqli('localhost', 'root', '', 'trening');
$db->autocommit(TRUE);
$sql = 'select Imie from trening where Imie like "Roman"';
$wynik = $db->query($sql);
return $wynik;
}

function WypiszZTekstem ($content) {
return $content.Wypisz();
}

add_filter('the_content', 'WypiszZTekstem');


to jest polaczenie ktorego uzywam w pluginie do wordpressa
wordpress wypluwa komunikat bledu: Catchable fatal error: Object of class mysqli_result could not be converted to string

Ten post edytował eremen 13.03.2016, 15:41:18
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
eremen
post
Post #2





Grupa: Zarejestrowani
Postów: 69
Pomógł: 0
Dołączył: 15.02.2012
Skąd: Głogów - Opole

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


tak tutaj http://php.net/manual/en/mysqli-result.fetch-assoc.php

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: 3.10.2025 - 20:12