Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
48 | 2 | 6 | 0.990 | class_member_list[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 48 | 234 | libraries/joomla/database/database/mysql.php |
2 | 48 | 250 | libraries/joomla/database/database/mysqli.php |
| ||||
/** * Description * * @access public * @return int The number of affected rows in the previous operation * @since 1.0.5 */ public function getAffectedRows() { return mysql_affected_rows($this->_resource); } /** * Execute a batch query * * @access public * @return mixed A database resource if successful, FALSE if not. */ public function queryBatch($abort_on_error=TRUE, $p_transaction_safe= FALSE) { $this->_errorNum = 0; $this->_errorMsg = ''; if ($p_transaction_safe) { $this->_sql = rtrim($this->_sql ,"; \t\r\n\000"); $si= $this->getVersion(); preg_match_all("/(\\d+)\\.(\\d+)\\.(\\d+)/i",$si,$m); if ($m[1]>= 4) { $this->_sql = 'START TRANSACTION;' . $this->_sql . '; COMMIT;'; } else if ($m[2]>= 23 && $m[3]>= 19) { $this->_sql = 'BEGIN WORK;' . $this->_sql . '; COMMIT;'; } else if ($m[2]>= 23 && $m[3]>= 17) { $this->_sql = 'BEGIN;' . $this->_sql . '; COMMIT;'; } } $query_split= $this->splitSql($this->_sql); $error= 0; foreach ($query_split as $command_line) { $command_line= trim($command_line); if ($command_line != '') { $this->_cursor = mysql_query($command_line, $this->_resource); if ($this->_debug) { $this->_ticker ++; $this->_log[]= $command_line; } if (!$this->_cursor) { $error= 1; $this->_errorNum .= mysql_errno($this->_resource) . ' '; $this->_errorMsg .= mysql_error($this->_resource) . " SQL=$command_line <br />"; if ($abort_on_error) { return $this->_cursor; } } } } return $error ? FALSE : TRUE; } |
| ||||
/** * Description * * @access public * @return int The number of affected rows in the previous operation * @since 1.0.5 */ public function getAffectedRows() { return mysqli_affected_rows($this->_resource); } /** * Execute a batch query * * @access public * @return mixed A database resource if successful, FALSE if not. */ public function queryBatch($abort_on_error=TRUE, $p_transaction_safe= FALSE) { $this->_errorNum = 0; $this->_errorMsg = ''; if ($p_transaction_safe) { $this->_sql = rtrim($this->_sql ,"; \t\r\n\000"); $si= $this->getVersion(); preg_match_all("/(\\d+)\\.(\\d+)\\.(\\d+)/i",$si,$m); if ($m[1]>= 4) { $this->_sql = 'START TRANSACTION;' . $this->_sql . '; COMMIT;'; } else if ($m[2]>= 23 && $m[3]>= 19) { $this->_sql = 'BEGIN WORK;' . $this->_sql . '; COMMIT;'; } else if ($m[2]>= 23 && $m[3]>= 17) { $this->_sql = 'BEGIN;' . $this->_sql . '; COMMIT;'; } } $query_split= $this->splitSql($this->_sql); $error= 0; foreach ($query_split as $command_line) { $command_line= trim($command_line); if ($command_line != '') { $this->_cursor = mysqli_query($this->_resource ,$command_line); if ($this->_debug) { $this->_ticker ++; $this->_log[]= $command_line; } if (!$this->_cursor) { $error= 1; $this->_errorNum .= mysqli_errno($this->_resource) . ' '; $this->_errorMsg .= mysqli_error($this->_resource) . " SQL=$command_line <br />"; if ($abort_on_error) { return $this->_cursor; } } } } return $error ? FALSE : TRUE; } |
| |||
/** * Description * * @access public * @return int The number of affected rows in the previous operation * @since 1.0.5 */ /** * Description * * @access public * @return int The number of affected rows in the previous operation * @since 1.0.5 */ public function getAffectedRows() { return [[#variable586001c0]]($this->_resource); } /** * Execute a batch query * * @access public * @return mixed A database resource if successful, FALSE if not. */ /** * Execute a batch query * * @access public * @return mixed A database resource if successful, FALSE if not. */ public function queryBatch($abort_on_error=TRUE,$p_transaction_safe=FALSE) { $this->_errorNum =0; $this->_errorMsg =''; if ($p_transaction_safe) { $this->_sql =rtrim($this->_sql ,"; \t\r\n\000"); $si=$this->getVersion(); preg_match_all("/(\\d+)\\.(\\d+)\\.(\\d+)/i",$si,$m); if ($m[1]>=4) { $this->_sql ='START TRANSACTION;' . $this->_sql . '; COMMIT;'; } else if ($m[2]>=23 && $m[3]>=19) { $this->_sql ='BEGIN WORK;' . $this->_sql . '; COMMIT;'; } else if ($m[2]>=23 && $m[3]>=17) { $this->_sql ='BEGIN;' . $this->_sql . '; COMMIT;'; } } $query_split=$this->splitSql($this->_sql); $error=0; foreach ($query_split as $command_line) { $command_line=trim($command_line); if ($command_line != '') { $this->_cursor = [[#variable58600140]]( [[#variable58600060]], [[#variable58600000]]); if ($this->_debug) { $this->_ticker ++; $this->_log[]=$command_line; } if (!$this->_cursor) { $error=1; $this->_errorNum .= [[#variable23d7c000]]($this->_resource) . ' '; $this->_errorMsg .= [[#variable58759f20]]($this->_resource) . " SQL=$command_line <br />"; if ($abort_on_error) { return $this->_cursor; } } } } return $error ? FALSE : TRUE; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#586001c0]] | mysql_affected_rows |
1 | 2 | [[#586001c0]] | mysqli_affected_rows |
2 | 1 | [[#58600140]] | mysql_query |
2 | 2 | [[#58600140]] | mysqli_query |
3 | 1 | [[#58600060]] | $command_line |
3 | 2 | [[#58600060]] | $this->_resource |
4 | 1 | [[#58600000]] | $this->_resource |
4 | 2 | [[#58600000]] | $command_line |
5 | 1 | [[#23d7c000]] | mysql_errno |
5 | 2 | [[#23d7c000]] | mysqli_errno |
6 | 1 | [[#58759f20]] | mysql_error |
6 | 2 | [[#58759f20]] | mysqli_error |