Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\Users\Tommy\Desktop\test\SERVER\htdocs\test\a1\Database\db_connection.php on line 2897
function __construct(){
$hostname = "localhost";
$username = "root";
$password = "";
$dbname = "t4_new";
// Create connection
$con = new mysqli($hostname, $username, $password, $dbname);
// Check connection
if ($con->connect_error) {
die("Connection failed: " . $con->connect_error);
}
function getOwnArtefactInfoByType($vref, $type) {
global $con;
$q = "SELECT * FROM " . TB_PREFIX . "artefacts WHERE vref = $vref AND type = $type order by size";
$result = mysqli_query($con,$q); //error aqui
return mysqli_fetch_array($result);
}