Ok so I created an instance of the mysqli class:
$siteconn = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
But when I try to run a query using this I get the error that's in the title... code as follows:
$result = $siteconn->query("SELECT * FROM categories ORDER BY id LIMIT $limit");
Any help appreciated!
Thanks in advance.