I am using x cart and trying to insert fields into a mysql database. x cart continually uses this type code to insert data into the database
db_query("INSERT INTO $sql_tbl[newslist_subscription] (listid, email, since_date) VALUES ('$id','$email', '".XC_TIME."')");
I copied this directly from the include/register.php file and this is working code that comes with x cart
My problem is when I try to use db_query in the example below i get an error "Fatal error: Call to undefined function db_query()"
db_query("INSERT INTO $sql_tbl[customers] (fb_name, email, fb_uid) VALUES ('$fb_name','$email', '$fb_id')");
Why is this? How is db_query not defined elsewhere? it is being used everywhere within xcart
What am I missing?