feel free to keep it strictly simple...
prepare_and_execute

Method "prepare_and_execute"

See file "class.database.php" for details.

 

Class-Method available since L* 1.3.2

 

Example

/*   1 */	$values = array(
/*   2 */		$section_id
/*   3 */	);
/*   4 */	
/*   5 */	$oStatement = $database->prepare_and_execute(
/*   6 */		"DELETE FROM `".TABLE_PREFIX."mod_code2` WHERE `section_id`= ?",
/*   7 */		$values
/*   8 */	);

Or, within the ":name" syntax:

/*   1 */	$values = array(
/*   2 */		'sid' => $section_id
/*   3 */	);
/*   4 */	
/*   5 */	$oStatement = $database->prepare_and_execute(
/*   6 */		"DELETE FROM `".TABLE_PREFIX."mod_code2` WHERE `section_id`= :sid",
/*   7 */		$values
/*   8 */	);