Skip to content

Commit 49ee952

Browse files
committed
Merge branch '3.1/develop' into 3.2/develop
2 parents 45f900b + f226b91 commit 49ee952

File tree

8 files changed

+9
-11
lines changed

8 files changed

+9
-11
lines changed

classes/kohana/database/query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php defined('SYSPATH') OR die('No direct script access.');
22
/**
3-
* Database query wrapper. See [Prepared Statements](database/query/prepared) for usage and examples.
3+
* Database query wrapper. See [Parameterized Statements](database/query/parameterized) for usage and examples.
44
*
55
* @package Kohana/Database
66
* @category Query

guide/database/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ CONNECTION_ARRAY
2424
: Specific driver options for connecting to your database. (Driver options are explained [below](#connection-settings).)
2525

2626
TABLE_PREFIX
27-
: Prefix that will be added to all table names by the [query builder](#query_building). Prepared statements will **not** use the table prefix.
27+
: Prefix that will be added to all table names by the [query builder](#query_building).
2828

2929
QUERY_PROFILING
3030
: Enables [profiling](../kohana/profiling) of database queries. This is useful for seeing how many queries each page is using, and which are taking the longest. You must enable the profiler the view these stats.

guide/database/examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
Here are some "real world" examples of using the database library to construct your queries and use the results.
44

5-
## Examples of Prepared Statements
5+
## Examples of Parameterized Statements
66

7-
TODO: 4-6 examples of prepared statements of varying complexity, including a good bind() example.
7+
TODO: 4-6 examples of parameterized statements of varying complexity, including a good bind() example.
88

99
## Pagination and search/filter
1010

guide/database/menu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## [Database]()
22
- [Configuration](config)
33
- [Querying](query)
4-
- [Prepared Statements](query/prepared)
4+
- [Parameterized Statements](query/parameterized)
55
- [Query Builder](query/builder)
66
- [Results](results)
77
- [Examples](examples)

guide/database/query.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Making Queries
22

3-
There are two different ways to make queries. The simplest way to make a query is to use [Database_Query], via [DB::query], to manually create queries. These queries are called [prepared statements](query/prepared) and allow you to set query parameters which are automatically escaped. The second way to make a query is by building the query using method calls. This is done using the [query builder](query/builder).
3+
There are two different ways to make queries. The simplest way to make a query is to use [Database_Query], via [DB::query], to manually create queries. These queries are called [parameterized statements](query/parameterized) and allow you to set query parameters which are automatically escaped. The second way to make a query is by building the query using method calls. This is done using the [query builder](query/builder).
44

55
[!!] All queries are run using the `execute` method, which accepts a [Database] object or instance name. See [Database_Query::execute] for more information.

guide/database/query/builder.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
Creating queries dynamically using objects and methods allows queries to be written very quickly in an agnostic way. Query building also adds identifier (table and column name) quoting, as well as value quoting.
44

5-
[!!] At this time, it is not possible to combine query building with prepared statements.
6-
75
## Select
86

97
Each type of database query is represented by a different class, each with their own methods. For instance, to create a SELECT query, we use [DB::select] which is a shortcut to return a new [Database_Query_Builder_Select] object:

guide/database/query/prepared.md renamed to guide/database/query/parameterized.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Prepared Statements
1+
# Parameterized Statements
22

3-
Using prepared statements allows you to write SQL queries manually while still escaping the query values automatically to prevent [SQL injection](http://wikipedia.org/wiki/SQL_Injection). Creating a query is simple:
3+
Using parameterized statements allows you to write SQL queries manually while still escaping the query values automatically to prevent [SQL injection](http://wikipedia.org/wiki/SQL_Injection). Creating a query is simple:
44

55
$query = DB::query(Database::SELECT, 'SELECT * FROM users WHERE username = :user');
66

guide/database/results.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Execute
44

5-
Once you have a query object built, either through a prepared statement or through the builder, you must then `execute()` the query and retrieve the results. Depending on the query type used, the results returned will vary.
5+
Once you have a query object built, either through a parameterized statement or through the builder, you must then `execute()` the query and retrieve the results. Depending on the query type used, the results returned will vary.
66

77
## Select
88

0 commit comments

Comments
 (0)