예제 #1
0
 /**
  * Handles updateAct
  * @param Object $queryObject
  * @param boolean $with_values
  * @return resource
  */
 function _executeUpdateAct($queryObject, $with_values = false)
 {
     if ($this->use_prepared_statements != 'Y') {
         return parent::_executeUpdateAct($queryObject);
     }
     $this->param = $queryObject->getArguments();
     $result = parent::_executeUpdateAct($queryObject, $with_values);
     unset($this->param);
     return $result;
 }
예제 #2
0
 function getOldParserQuery($outputString)
 {
     $output = eval($outputString);
     if (is_a($output, 'Object')) {
         if (!$output->toBool()) {
             exit("Date incorecte! Query-ul nu a putut fi executat.");
         }
     }
     /*	SQL Server
     			 * 
     			$db = new DBMssql(false);
     			if($output->action == "select")
     				return $db->_executeSelectAct($output);
     			else if($output->action == "insert")
     				return $db->_executeInsertAct($output);
     			else if($output->action == "delete")
     				return $db->_executeDeleteAct($output);				
     			else if($output->action == "update")
     				return $db->_executeUpdateAct($output);
     			*/
     /*
      * Mysql  
      */
     $db = new DBMysql(false);
     if ($output->action == "select") {
         $db->_executeSelectAct($output);
     } else {
         if ($output->action == "insert") {
             $db->_executeInsertAct($output);
         } else {
             if ($output->action == "delete") {
                 $db->_executeDeleteAct($output);
             } else {
                 if ($output->action == "update") {
                     $db->_executeUpdateAct($output);
                 }
             }
         }
     }
     return $db->getLatestQuery();
 }