• Re: Why do I get error when same code works elsewhere?

    From =?UTF-8?B?6qeB6qeC?=@vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvva@hotmail.com to comp.lang.php on Sun May 14 08:53:18 2023
    From Newsgroup: comp.lang.php

    No problem, Bill, happens to everyone time to time.
    On Wednesday, April 1, 2015 at 2:27:38rC>PM UTC+2, bill wrote:
    On 3/31/2015 8:24 AM, Christoph M. Becker wrote:
    bill wrote:

    On 3/29/2015 9:47 PM, richard wrote:

    $result = $mysqli->query($sql);<<<<<<<<<<< error here

    Fatal error: Call to a member function query() on a non-object

    Now, your task is to read the introductory chapters about PDO
    http://us1.php.net/manual/en/class.pdo.php

    Err, why PDO? Apparently, richard is using mysqli, what would be fine.

    Whoops, my fingers are faster than my mind.
    Yes, mysqli:
    http://us1.php.net/manual/en/class.mysqli.php

    -bill
    --- Synchronet 3.21d-Linux NewsLink 1.2