Tripsy
6/27/2019 - 8:56 AM

skin mysql insert

//query -> insert
Database::insertData('
	INSERT INTO invoice SET
		id = :id,
		source = :source,
		setDate = NOW(),
		file_path = :file_path,
		file_content = :file_content', array(
	array('name' => 'id', 'value' => '1', 'type' => PDO::PARAM_INT),
	array('name' => 'source', 'value' => 'Lorem ipsum', 'type' => PDO::PARAM_STR),
));

//vars
$id_entry = Database::lastId();