require_once '../../../include/cp_header.php';
xoops_cp_header();
//lots of code
xoops_cp_footer();
2. the XOOPS db class should take care of this.
$sql = "select * from ".$xoopsDB->prefix("tablename")." where ...";
hope this is what you mean...
CU Highlander
http://www.AnimalPedigree.com