Exemplo n.º 1
0
		foreach($ids as $key => $value){
			$bind[$key] = &$ids[$key];
		}
		array_unshift($bind, $types);
		call_user_func_array(array($stmt, "bind_param"), $bind);
		$rc = $stmt->execute();
		$stmt->close();
		return true;
	}
	
	public function setKeywords($id, $keywords) {
		$con = &$this->db;
		$files = &$this->files;
		$stmt = $con->prepare("UPDATE $files SET keywords=? WHERE id=?");
		$rc = $stmt->bind_param("si", $keywords, $id);
		$rc = $stmt->execute();
		$stmt->close();
		return true;
	}
}

require_once('dbcon.php');

/*
	Initialize the dbFunctions() object and set connection & tables
*/
$dbf = new dbFunctions();
$dbf->setDb($con);
$dbf->setFileTable(/*some_table*/);
$dbf->setExtensionTable(/*another_table*/);
?>