Skip to content

Commit

Permalink
修复数据库中type的错误关键字
Browse files Browse the repository at this point in the history
breath-co2 committed Feb 5, 2014

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
1 parent 483378a commit 1c3d4f5
Showing 6 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion drivers/database/mongo/mongo.class.php
Original file line number Diff line number Diff line change
@@ -327,7 +327,7 @@ protected function _select_db($database)
}
}

public function compile($builder, $type = 'selete')
public function compile($builder, $type = 'select')
{
$where = array();
if (!empty($builder['where']))
10 changes: 5 additions & 5 deletions drivers/database/mysql/mysql.class.php
Original file line number Diff line number Diff line change
@@ -364,11 +364,11 @@ protected function _select_db($database)
/**
* 构建SQL语句
*/
public function compile($builder, $type = 'selete')
public function compile($builder, $type = 'select')
{
if ($type == 'selete')
if ($type == 'select')
{
return $this->_compile_selete($builder);
return $this->_compile_select($builder);
}
else if ($type == 'insert')
{
@@ -388,7 +388,7 @@ public function compile($builder, $type = 'selete')
}
else
{
return $this->_compile_selete($builder);
return $this->_compile_select($builder);
}
}

@@ -849,7 +849,7 @@ protected function _quote_identifier($column)
return $column;
}

protected function _compile_selete($builder)
protected function _compile_select($builder)
{
$quote_ident = array($this, '_quote_identifier');

10 changes: 5 additions & 5 deletions drivers/database/mysqli/mysqli.class.php
Original file line number Diff line number Diff line change
@@ -368,11 +368,11 @@ protected function _select_db($database)
/**
* 构建SQL语句
*/
public function compile($builder, $type = 'selete')
public function compile($builder, $type = 'select')
{
if ($type == 'selete')
if ($type == 'select')
{
return $this->_compile_selete($builder);
return $this->_compile_select($builder);
}
else if ($type == 'insert')
{
@@ -392,7 +392,7 @@ public function compile($builder, $type = 'selete')
}
else
{
return $this->_compile_selete($builder);
return $this->_compile_select($builder);
}
}

@@ -852,7 +852,7 @@ protected function _quote_identifier($column)
return $column;
}

protected function _compile_selete($builder)
protected function _compile_select($builder)
{
$quote_ident = array($this, '_quote_identifier');

10 changes: 5 additions & 5 deletions drivers/database/postgre/postgre.class.php
Original file line number Diff line number Diff line change
@@ -320,11 +320,11 @@ public function close_connect()
/**
* 构建SQL语句
*/
public function compile($builder, $type = 'selete')
public function compile($builder, $type = 'select')
{
if ($type == 'selete')
if ($type == 'select')
{
return $this->_compile_selete($builder);
return $this->_compile_select($builder);
}
else if ($type == 'insert')
{
@@ -344,7 +344,7 @@ public function compile($builder, $type = 'selete')
}
else
{
return $this->_compile_selete($builder);
return $this->_compile_select($builder);
}
}

@@ -795,7 +795,7 @@ protected function _quote_identifier($column)
return $column;
}

protected function _compile_selete($builder)
protected function _compile_select($builder)
{
$quote_ident = array($this, '_quote_identifier');

10 changes: 5 additions & 5 deletions drivers/database/sqlite/sqlite.class.php
Original file line number Diff line number Diff line change
@@ -225,11 +225,11 @@ public function close_connect()
/**
* 构建SQL语句
*/
public function compile($builder, $type = 'selete')
public function compile($builder, $type = 'select')
{
if ($type == 'selete')
if ($type == 'select')
{
return $this->_compile_selete($builder);
return $this->_compile_select($builder);
}
else if ($type == 'insert')
{
@@ -249,7 +249,7 @@ public function compile($builder, $type = 'selete')
}
else
{
return $this->_compile_selete($builder);
return $this->_compile_select($builder);
}
}

@@ -646,7 +646,7 @@ protected function _quote_identifier($column)
return $column;
}

protected function _compile_selete($builder)
protected function _compile_select($builder)
{
$quote_ident = array($this, '_quote_identifier');

2 changes: 1 addition & 1 deletion modules/database/driver.class.php
Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@ public function __destruct()
/**
* 构建SQL语句
*/
abstract public function compile($builder, $type = 'selete');
abstract public function compile($builder, $type = 'select');

/**
* 查询

0 comments on commit 1c3d4f5

Please sign in to comment.