Kacper Wojciechowski
- Mentor MyBB
- 858 119 156 43
Witam, mam problem z funkcją insert_query, mianowicie mam błąd:
Z tego co rozumiem, funkcja nie jest zdefiniowana ale to przecież funkcja MyBB
Mój kod:
Fatal error: Call to undefined method mysqli::insert_query()
Mój kod:
$query = $con->query("SELECT * FROM goldPanel_News");
while ($row = $query->fetch_assoc()) {
$dane_admina = $con->query("SELECT PLAYER_ADMIN_LEVEL FROM premiumMod_Admins WHERE PLAYER_NAME='".$row['Author']."'");
$dane_admina = $dane_admina->fetch_assoc();
$dane_konta = $con->query("SELECT PLAYER_VIP_TIME, PLAYER_SKIN FROM premiumMod_Players WHERE PLAYER_NAME='".$row['Author']."'");
$dane_konta = $dane_konta->fetch_assoc();
$nick = nameRank($row['Author'], $dane_admina['PLAYER_ADMIN_LEVEL'], $dane_konta['PLAYER_VIP_TIME'], '1');
eval("\$panel .= \"".$templates->get("pg_news_row")."\";");
}
$panel .= '<form action="panel.php?module=main&controller=main" method="post">
<input required class="textbox" name="topicName" size="40" maxlength="85" value="" tabindex="1" type="text">
<textarea style="width: 100%; padding: 4px; margin: 0;" rows="8" cols="80" name="topicThread" tabindex="1"></textarea>
<input value="Napisz temat" class="button" name="submit" tabindex="4" accesskey="s" type="submit">
</form>';
if ($mybb->request_method == "post") {
$temat = array(
"Author" => "X3nO",
"Topic" => $db->escape_string($mybb->get_input('topicName')),
"Thread" => $db->escape_string($mybb->get_input('topicThread')),
"Date" => date("d.m.Y, H:i:s")
);
if ($con->insert_query("goldPanel_News", $temat)) {
$panel .= "Dodana wpis do bazy danych.";
}
}