1
Greetings!
I'm trying to add an admin page for inserting records into my database, but have run into a brick wall.
Here's a compact version of my function:
funcion addEvent() {
$xoopsDB =& Database::getInstance();
xoops_cp_header();
$query=(VALID MySQL QUERY, I tested it by echoing it and copy/pasting it into the MySQL cli.)
if($xoopsDB->query($query))
redirect_header("index.php",1,"Event was added.");
else {
$query_error = $xoopsDB->error();
redirect_header("index.php",7,"Event was NOT added. SQL Query was:
$query
Error was:
$q
uery_error");
}
}
This always results in the query failing, but there being no error message. I got the basic structure from some other modules, and I can't figure out how mine is different. Any help would be greatly appreciated :)