MyBB Central

Full Version: Need help displaying a thread somewhere else.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying yo take threads some a certain forum and display them on my homepage for quick news but I don't know how you would do it other then using sql and I already tried that and failed.

Here is what I am trying. ( I am bad at sql so try and be gentle on me.)
$mysqli = new mysqli("localhost", "mydatabaseusername", "mydatabasepassword", "mydatabase");
if ($mysqli->connect_errno) {
    echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;

if ($mysqli->query("SELECT fid FROM mybb_forumthreads ORDER BY firstpost LIMIT 5")){
     $res = $mysqli->use_result();