Skip to content

Commit

Permalink
Really fix that FROM group condition
Browse files Browse the repository at this point in the history
  • Loading branch information
narfbg committed Oct 9, 2012
1 parent 7eaa14f commit fce9abe
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion system/database/drivers/cubrid/cubrid_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ protected function _update_batch($table, $values, $index, $where = NULL)
*/
protected function _from_tables()
{
if ( ! empty($this->qb_join) && count($this->qb_from) > 0)
if ( ! empty($this->qb_join) && count($this->qb_from) > 1)
{
return '('.implode(', ', $this->qb_from).')';
}
Expand Down
2 changes: 1 addition & 1 deletion system/database/drivers/mysql/mysql_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ protected function _update_batch($table, $values, $index, $where = NULL)
*/
protected function _from_tables()
{
if ( ! empty($this->qb_join) && count($this->qb_from) > 0)
if ( ! empty($this->qb_join) && count($this->qb_from) > 1)
{
return '('.implode(', ', $this->qb_from).')';
}
Expand Down
2 changes: 1 addition & 1 deletion system/database/drivers/mysqli/mysqli_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ protected function _update_batch($table, $values, $index, $where = NULL)
*/
protected function _from_tables()
{
if ( ! empty($this->qb_join) && count($this->qb_from) > 0)
if ( ! empty($this->qb_join) && count($this->qb_from) > 1)
{
return '('.implode(', ', $this->qb_from).')';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ protected function _truncate($table)
*/
protected function _from_tables()
{
if ( ! empty($this->qb_join) && count($this->qb_from) > 0)
if ( ! empty($this->qb_join) && count($this->qb_from) > 1)
{
return '('.implode(', ', $this->qb_from).')';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ protected function _truncate($table)
*/
protected function _from_tables()
{
if ( ! empty($this->qb_join) && count($this->qb_from) > 0)
if ( ! empty($this->qb_join) && count($this->qb_from) > 1)
{
return '('.implode(', ', $this->qb_from).')';
}
Expand Down

0 comments on commit fce9abe

Please sign in to comment.