Download the PHP package marsapp/sqlhelper-yii2 without Composer
On this page you can find all versions of the php package marsapp/sqlhelper-yii2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download marsapp/sqlhelper-yii2
More information about marsapp/sqlhelper-yii2
Files in marsapp/sqlhelper-yii2
Package sqlhelper-yii2
Short Description Provide sql helper for Yii2
License MIT
Homepage https://github.com/marshung24/SqlHelper-Yii
Informations about the package sqlhelper-yii2
SqlHelper for Yii2
Provides assistance in using functions to handle SQL grammar construction.
- SqlHelper for Yii2
- Installation
- Composer Install
- API Reference
- batchUpdate
- Description
- Usage
- SQL syntax
- whereInChunk
- Description
- Usage
- SQL syntax
- timeIntersect
- Description
- Usage
- SQL syntax
Installation
Composer Install
API Reference
batchUpdate
Description
Help construct the query syntax for batch updates by using the functions.
Parameters
- $table: table name
- $columns: Fields to be processed
- $rows: The values to be processed
- $conditionArray: The value of the target field
- $conditionColumn: The name of the target field
Return Values
- Returns \yii\db\Command
Usage
We can use batchUpdate via SqlHelper as follows:
SQL syntax
The database syntax constructed by batchUpdate is as follows:
whereInChunk
Description
Help us split the array by using the functions.
Parameters
- $fieldName: Field to be processed
- $fieldList: The values to be processed
- $query: ActiveQuery
- $size: Cutting length
Return Values
- Returns ActiveQuery
Usage
We can use whereInChunk via SqlHelper as follows:
SQL syntax
The database syntax constructed by batchUpdate is as follows:
timeIntersect
Description
Help construct the query syntax for the intersection of time periods by using the functions.
Parameters
- $sCol: Field name for start date
- $eCol: Field namd for end date
- $sDate: Value for start date
- $eDate: Value for end date
- $query: ActiveQuery
Return Values
- Returns ActiveQuery
Usage
We can use timeIntersect via SqlHelper as follows:
SQL syntax
The database syntax constructed by batchUpdate is as follows: