mysqli and inner join
I have a problem with this script, I s开发者_Go百科elect from 2 tables but I don't know how to bind the result.
I get this error :
Fatal error: Call to a member function bind_result() on a non-object
This is my code : http://pastebin.com/5sShTSMC
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
function connect() {
$mysql = new mysqli('localhost', 'root', '', 'database') or die('Der var et problem med at connecte til databasen');
return $mysql;
}
First check if your query is correct (all tables and columns exists), i think you missed something there. Use a var_dump
to check if $stmt
is a object or a FALSE
.
精彩评论