$sql = "INSERT INTO ".$modx->getFullTableName(’site_content’)." (pagetitle,alias,template,published,delete,hidemenu,parent,content) VALUES (’".$pagetitle."’,’".$alias."’,’$template’,’$published’,’$delete’,’$hidemenu’,’$parent’,’".$content."’)";and the error
$rs = $modx->db->query($sql);
MODx encountered the following error while attempting to parse the requested resource:thanks
« Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’delete,hidemenu,parent,content) VALUES (’ddddd’,’ddddd’,’4’,’0’,’0’,’0’,’1’,’ddd’ at line 1 »
SQL: INSERT INTO `puedesbe_proyectoshydra`.modx_site_content (pagetitle,alias,template,published,delete,hidemenu,parent,content) VALUES (’ddddd’,’ddddd’,’4’,’0’,’0’,’0’,’1’,’ddddd’)
Me pregunto si se puede funcionar este:$sql = "INSERT INTO ".$modx->getFullTableName('site_content')." (pagetitle,alias,template,published,delete,hidemenu,parent,content) VALUES ('".$pagetitle."','".$alias."','".$template."','".$published."','".$delete."','".$hidemenu."','".$parent."','".$content."')";
$rs = $modx->db->query($sql);