开发者

mysqli and inner join

开发者 https://www.devze.com 2023-01-03 05:07 出处:网络
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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消