When I want to define a custom sort order in a MySQL query I can do something like this:
My current query can count the number of participants that belongs to each department:
I have a simple results table that looks like the following –
Help me to query this.
I have a Laravel app where have a table that has 3 columns (quartal, year, value).
i’m getting the following error when trying to filter a query by ID:
Suppose we have one dataBase that have one table called fathers; and another table called children.
In my laravel project I have tables shown as below.
I have a table
basicinfo with a column
dateOfEnrollment of type
date. I want to query all the records that are enrolled for more than 4 years. How can I do that ?
I’m going to convert this Eloquent query to DB query in Laravel.
I have a very simple function that loops through an array and inserts some data into a results table – this works perfectly fine on my local using the very same code. On my local setup (Mac) using Laravel Valet & an MySQL database it hits the function
Result::create($data) and inserts this data in the database. However on the live/remote site it never hits the
Result::create() within the
insertUniqueMatches for some reason.