2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2010 */
6 /* Inclusive Design Institute */
8 /* This program is free software. You can redistribute it and/or */
9 /* modify it under the terms of the GNU General Public License */
10 /* as published by the Free Software Foundation. */
11 /************************************************************************/
14 * DAO for "patches_files_actions" table
20 if (!defined('TR_INCLUDE_PATH')) exit;
22 require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
24 class PatchesFilesActionsDAO extends DAO {
29 * @param $patches_files_id, $action, $code_from, $code_to
30 * @return patches_files_actions_id, if successful
31 * false and add error into global var $msg, if unsuccessful
34 public function Create($patches_files_id, $action, $code_from, $code_to)
38 $sql = "INSERT INTO " . TABLE_PREFIX. "patches_files_actions " .
44 (".$patches_files_id.",
46 '".$addslashes($code_from)."',
47 '".$addslashes($code_to)."')";
49 if (!$this->execute($sql))
51 $msg->addError('DB_NOT_UPDATED');
56 return mysql_insert_id();