Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:bcit-ci/CodeIgniter4 into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnieezell committed Dec 29, 2016
2 parents 0035235 + f033c55 commit 3a8b64a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ composer.lock
# Modules Testing
_modules/*

# phpenv local config
.php-version

# Jetbrains editors (PHPStorm, etc)
.idea/
*.iml
Expand All @@ -102,10 +105,14 @@ nbactions.xml
nb-configuration.xml
.nb-gradle/

## Sublime Text
# Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project
/api/
/api/

# Visual Studio Code
.vscode/

11 changes: 5 additions & 6 deletions user_guide_src/source/database/query_builder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,8 @@ The second parameter lets you set a result offset.

**$builder->countAllResults()**

Permits you to determine the number of rows in a particular Active
Record query. Queries will accept Query Builder restrictors such as
Permits you to determine the number of rows in a particular Query
Builder query. Queries will accept Query Builder restrictors such as
``where()``, ``orWhere()``, ``like()``, ``orLike()``, etc. Example::

echo $builder->countAllResults('my_table'); // Produces an integer, like 25
Expand Down Expand Up @@ -623,8 +623,7 @@ Here is an example using an object::
$builder->insert($object);
// Produces: INSERT INTO mytable (title, content, date) VALUES ('My Title', 'My Content', 'My Date')

The first parameter will contain the table name, the second is an
object.
The first parameter is an object.

.. note:: All values are escaped automatically producing safer queries.

Expand Down Expand Up @@ -898,9 +897,9 @@ Generates a delete SQL string and runs the query.

$builder->delete(array('id' => $id)); // Produces: // DELETE FROM mytable // WHERE id = $id

The first parameter is the table name, the second is the where clause.
The first parameter is the where clause.
You can also use the where() or or_where() functions instead of passing
the data to the second parameter of the function::
the data to the first parameter of the function::

$builder->where('id', $id);
$builder->delete();
Expand Down

0 comments on commit 3a8b64a

Please sign in to comment.