$rs = mysql_query("SELECT elements,id FROM $dbase.".$table_prefix."site_tmplvars WHERE id=$id");
$row = $rs;
$value = $row[’elements’];
$rest =substr($id, 2, 0);and send "Fatal error: Call to undefined function: fetchrow() in /home/puedesbe/public_html/balu/inicio/manager/includes/tmplvars.format.inc.php on line 129"
$table = $modx->getFullTableName("site_tmplvars");
$result = $modx->db->select("name, elements", $table, "name = ’.$rest.’ ");
$row = fetchRow($result);
$value = $row[’elements’ ];
, here’s what you need to do...replace $row= fetchRow($result) [NOTE: which should have been $row= $modx->fetchRow(), but this is a deprecated function from Eto] with...$value= '';
if ($row= $modx->db->getRow($result)) {
$value= $row['elements'];
}