This topic is locked
[SOLVED]

 Call to undefined function Insert()

4/8/2018 7:18:04 PM
PHPRunner General questions
H
headingwest author

Hi, I can't figure out this error:
Fatal error: Uncaught Error: Call to undefined function Insert() in D:\xampp\htdocs\dashing\test.php:10 Stack trace: #0 {main} thrown in D:\xampp\htdocs\dashing\test.php on line 10
I'm using DB::Insert multiple times prior to this, but this one fails.





$notedata = array();
$notedata["leadid"] = 11;

$notedata["note"] = "test";

DB:Insert("note", $notedata);


However the following works:



CustomQuery("insert into note (leadid,note) values (11, 'test')");


This also works:



$contactdata = array();

$contactdata['leadid'] = 11;

DB::Insert("contact", $contactdata);


Here's another example:



$contactdata = array(); // works

$contactdata['leadid'] = 11; // works

$contactdata['firstname'] = "test"; // works

DB::Insert("contact", $contactdata); // works
$notedata = array(); // works

$notedata['leadid'] = 11; // works

$notedata['note'] = "test"; // works

DB:Insert("note", $notedata); // dies!!!
admin 4/10/2018

: and :: are not the same thing
DB:Insert -> wrong

DB::Insert -> right

H
headingwest author 4/11/2018

Thanks Sergey
Aaarrggh, just one colon cost me hours.