Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion user_guide_src/source/database/query_builder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ searches.
.. literalinclude:: query_builder/039.php

If you want to control where the wildcard (**%**) is placed, you can use
an optional third argument. Your options are ``before``, ``after`` and
an optional third argument. Your options are ``none``, ``before``, ``after`` and
``both`` (which is the default).

.. literalinclude:: query_builder/040.php
Expand Down
1 change: 1 addition & 0 deletions user_guide_src/source/database/query_builder/040.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

$builder->like('title', 'match', 'none'); // Produces: WHERE `title` LIKE 'match' ESCAPE '!'
$builder->like('title', 'match', 'before'); // Produces: WHERE `title` LIKE '%match' ESCAPE '!'
$builder->like('title', 'match', 'after'); // Produces: WHERE `title` LIKE 'match%' ESCAPE '!'
$builder->like('title', 'match', 'both'); // Produces: WHERE `title` LIKE '%match%' ESCAPE '!'