1
Hi, I'm trying to query a database from a module (developed by myself). But when I try to query the database, with an insert string, I have nothing at all. blank I dont know wats happens
please help, heres me code.
php
include("../../mainfile.php");
global $xoopsDB;
$xoopsDB =& Database::getInstance();
$sql = "INSERT INTO xoops_mi_modulo VALUES (0,'pablo', '0015634','12')";
$xoopsDB->query($sql);
if (!$xoopsDB->query($sql) )
{
echo( $xoopsDB->error." : ".$xoopsDB->errno );
}
echo "respuesta=";
echo XOOPS_ROOT_PATH;
echo "&";
?>
It's suposed to insert a record in the table, but nothing is happens, the table is not touched.
The database is accese properly for XOOPS, all goes smoothly but this script.
I turn the PHP debug mode in preferences and this is what I get.
Quote:
Notice [PHP]: Undefined property: error in file
C:\www\webroot\modules\mimodulo\update_score.php line 13
What I' doing grong?