Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
6a2bfae4
Commit
6a2bfae4
authored
Mar 29, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use parameter binding for query builder.
parent
00319fb8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
Command.php
framework/db/Command.php
+1
-1
Connection.php
framework/db/Connection.php
+7
-7
QueryBuilder.php
framework/db/QueryBuilder.php
+0
-0
No files found.
framework/db/Command.php
View file @
6a2bfae4
...
...
@@ -543,7 +543,7 @@ class Command extends \yii\base\Component
*/
public
function
delete
(
$table
,
$condition
=
''
,
$params
=
array
())
{
$sql
=
$this
->
db
->
getQueryBuilder
()
->
delete
(
$table
,
$condition
);
$sql
=
$this
->
db
->
getQueryBuilder
()
->
delete
(
$table
,
$condition
,
$params
);
return
$this
->
setSql
(
$sql
)
->
bindValues
(
$params
);
}
...
...
framework/db/Connection.php
View file @
6a2bfae4
...
...
@@ -248,15 +248,15 @@ class Connection extends Component
* [[Schema]] class to support DBMS that is not supported by Yii.
*/
public
$schemaMap
=
array
(
'pgsql'
=>
'yii\db\pgsql\Schema'
,
// PostgreSQL
'mysqli'
=>
'yii\db\mysql\Schema'
,
// MySQL
'mysql'
=>
'yii\db\mysql\Schema'
,
// MySQL
'sqlite'
=>
'yii\db\sqlite\Schema'
,
// sqlite 3
'pgsql'
=>
'yii\db\pgsql\Schema'
,
// PostgreSQL
'mysqli'
=>
'yii\db\mysql\Schema'
,
// MySQL
'mysql'
=>
'yii\db\mysql\Schema'
,
// MySQL
'sqlite'
=>
'yii\db\sqlite\Schema'
,
// sqlite 3
'sqlite2'
=>
'yii\db\sqlite\Schema'
,
// sqlite 2
'mssql'
=>
'yi\db\dao\mssql\Schema'
,
// Mssql driver on windows hosts
'
dblib'
=>
'yii\db\mssql\Schema'
,
// dblib drivers on linux (and maybe others os) hosts
'
sqlsrv'
=>
'yii\db\mssql\Schema'
,
// Mssql
'
oci'
=>
'yii\db\oci\Schema'
,
// Oracle driver
'
sqlsrv'
=>
'yii\db\mssql\Schema'
,
// Mssql
'
oci'
=>
'yii\db\oci\Schema'
,
// Oracle driver
'
dblib'
=>
'yii\db\mssql\Schema'
,
// dblib drivers on linux (and maybe others os) hosts
);
/**
* @var Transaction the currently active transaction
...
...
framework/db/QueryBuilder.php
View file @
6a2bfae4
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment