Top "Query-builder" questions

A query-builder is a set of classes and methods that is able to programmatically build queries.

How to use WHERE IN with Doctrine 2

I have the following code which gives me the error: Message: Invalid parameter number: number of bound variables does not …

php doctrine-orm query-builder
Laravel 5.2 - pluck() method returns array

I'm trying to upgrade my project L5.1 -> L5.2. In upgrade guide there's one thing which isn't clear for …

php laravel eloquent query-builder laravel-5.2
How to select from subquery using Laravel Query Builder?

I'd like to get value by the following SQL using Eloquent ORM. - SQL SELECT COUNT(*) FROM (SELECT * FROM abc …

sql laravel laravel-4 eloquent query-builder
Laravel whereIn OR whereIn

I'm making a products search by filters: My code: ->where(function($query) use($filter) { if(!empty($filter)){ foreach ($…

php mysql laravel laravel-4 query-builder
How to select distinct query using symfony2 doctrine query builder?

I have this symfony code where it retrieves all the categories related to a blog section on my project: $category = $…

php doctrine-orm symfony query-builder
Select entries between dates in doctrine 2

I will go insane with this minimal error that I'm not getting fix. I want to select entries between two …

php date doctrine-orm between query-builder
Laravel Query Builder where max id

How do I accomplish this in Laravel 4.1 Query Builder? select * from orders where id = (select max(`id`) from orders) I …

php laravel query-builder
DB query builder toArray() laravel 4

I'm trying to convert a query to an array with the method toArray() but it doesn't work for the query …

laravel-4 query-builder
Laravel Query Builder - sum() method issue

Ehi there, I'm new in laravel and I have some issues with laravel query builder. The query I would like …

php mysql database laravel query-builder
Symfony 2: INNER JOIN on non related table with doctrine query builder

I'm trying to build a query with the doctrine query builder which joins a non related table like this: $query = $…

php mysql symfony doctrine query-builder