• in my plugin, i have a method as such:

    function add_ip($datetime, $ip)
    {
    global $wpdb;
    $table_name = $wpdb->prefix . “preclickform_ips”;
    $wpdb->query(“INSERT INTO ” . $table_name . ” (datetime, ip) VALUES (‘” . $datetime. “‘,'” . $ip . “‘)”);
    }

    AND I GET A FATAL ERROR

Viewing 1 replies (of 1 total)
  • Thread Starter mozey

    (@mozey)

    it seems that my wpdb is not instantiated properly!. i tried a whole different ways of doing this!, no way!

Viewing 1 replies (of 1 total)
  • The topic ‘Call to a member function query() on a non-object in’ is closed to new replies.