in My Larvel 5.6 app I am working with mysql db. and in my application I have vehicle table with following columns, vehicles, and I am going to group all models of the table and printing here as My controller, my printing blade file is this, it is printing well as now I need print in-front of model name there
Tag: mysql
How to get the value of specific index inside an array column using mysql?
I am passing index id to the function. Is there a way to do it like this? Answer Use the arrow operator (MySQL-only): Or its alias JSON_EXTRACT() (MySQL & MariaDB):
PHP mkdir():Permission denied
I have a simple PHP/HTML/CSS app that creates a folder for newly registered users. It worked great on my test site, and not that I am ready to “go live” I get the “mkdir(): Permission denied” error. As far as I know, all settings are the same on both sites and the file permission for t…
watch database and wait for changes in laravel
i have a messaging system app and every message has some status in it with 3 types of done , in progress,not started so when i send a message to user B its not started for example so when user B receive the message he changes the status to in progress here i want to send a notification to the
PHP/SQL – querying relational DB for IDs but being able to query those IDs in seperate DB using ORDER BY
I have an ecommerce site where I have some products that can be in multiple categories. I therefore have a products table, a categories table, and a product_categories table. So what I do is query …
WordPress Editor not updating files: Unable to communicate back with site to check for fatal errors
I’ve run into an issue with updating the header.php file in a WordPress website. Firstly, I tried updating the file manually through C-Panel -> File Manager. The code appears to stay in the file, but when you view the page source in incognito mode and different web browsers the code doesn’t ren…
Adding GROUP BY support to the ssp class in complex function
I am using datatables v 1.10.19 As i was using the following ,the group by destroys the pagination and only shows one page. $where = “recipient=’”.$recipient.”‘ AND grouped=” GROUP BY id …
Error: Undefined class constant ‘MYSQL_ATTR_USE_BUFFERED_QUERY’
Currently I’m getting this kind of message and I don’t know how to fix it. The command php -m tells me that PDO and pdo_mysql are there. I’m using Drupal-8 with php7.1.20 on Ubuntu 18.04.1 LTS [Tue Sep 04 09:27:48.210064 2018] [php7:notice] [pid 2183] [client 10.56.99.1:53758] Error: Undefin…
Select active data by order
I have 2 tables posts and categories, There is one-to-many relation between both tables. Here are the two tables: There is a relation between category_id and c_id, So that the category_id in the posts table refers to the category id c_id. The post_order and c_order are used to order both posts and categories.…
whereJsonContains Laravel 5.6 not working?
The eloquent query above seems to only work when there is a single item in the ‘players’ json array. The data stored in the database looks as follows: [1] vs [“1″,”2”] Is there a reason the whereJsonContains is only working when it sees [1] in the db but not when it sees [&…