Snippets tagged “query-builder”
15 snippets use this tag.
- Codeigniter's `where` and `or_where`PHP
In CodeIgniter, the where method on the database class is used to add a WHERE clause to your query.
- Doctrine 2: Update query with query builderPHP
To update an entry in a database using Doctrine's query builder, you can use the update method of the QueryBuilder class.
- Eloquent model mass updatePHP
To update multiple records in the Eloquent ORM (Object-Relational Mapping) in Laravel, you can use the update() method on the query builder or on a model instance.
- findAll() in yiiPHP
In the Yii framework, the findAll() method is used to retrieve all records from a database table that match a specified condition.
- How to alias a table in Laravel Eloquent queries (or using Query Builder)?PHP
To alias a table in a Laravel Eloquent query, you can use the as method on a DB facade.
- How to count and group by in yii2PHP
In Yii2, you can use the count() and groupBy() methods in the query builder to count and group the results of a query, respectively.
- How to delete multiple records using Laravel EloquentPHP
You can use the destroy() method in Laravel Eloquent to delete multiple records.
- How to get the Query Builder to Output its Raw SQL Query as a String with PHPPHP
If you want to grasp the way of getting a query builder to output its raw SQL query as a string using PHP, then you are in the right place.
- How to Make Laravel Eloquent "IN" Query?PHP
You can use the whereIn method on a query builder instance to create an "IN" clause for a given column and values.
- Laravel - where less/greater than date syntaxPHP
In Laravel, you can use the where method on a query builder or an Eloquent model to filter records based on a date column using less than or greater than operators.
- Laravel Delete Query BuilderPHP
In Laravel, you can use the Query Builder to delete records from a database table.
- Laravel Eloquent inner join with multiple conditionsPHP
To perform an inner join with multiple conditions using Laravel's Eloquent ORM, you can use the join method on a query builder instance.
- Laravel Query Builder where max idPHP
In Laravel, you can use the Query Builder's max method to retrieve the maximum value of a specific column.
- Laravel: getting a single value from a MySQL queryPHP
To get a single value from a MySQL query in Laravel, you can use the value method on a query builder instance.
- Laravel: How to get last N entries from DBPHP
You can use the latest method on a query builder instance to get the last N entries from the database.