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

    From =?UTF-8?B?6qeB6qeC?=@21:1/5 to bill on Sun May 14 08:53:18 2023
    No problem, Bill, happens to everyone time to time.


    On Wednesday, April 1, 2015 at 2:27:38 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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)