I insert json data to mySql database like this: Now, I try to update social-enable value using JSON_REPLACED method like this: In action I see this error: How do can I fix this problem? Answer JSON Path Syntax … Names of keys must be double-quoted strings or valid ECMAScript identifiers (see Identifier …
How to set up live reloading with webpack-encore in a Symfony project?
I have created a Symfony full web app with the given command symfony new app –webapp. It came with Webpack configured with webpack-encore. I can have my assets compiled with npm run watch. But the browser don’t reload automatically when my I make changes. I have tried webpack-dev-server following …
Uploading large video file
I would like to build a webpage(simple form) where users can submit media files, most likely video files. The video files will be anywhere from 100mb – 500mb(or possibly more, depending on the file compression) I was wondering if you could recommend any hosting plan(or company) that may fit my requireme…
I’m using trumbowyg as text editor for the textareas in my forum, but how do I echo it?
I didn’t find any post related to my problem, so here I go : I added trumbowyg (it’s a WYSIWYG editor) to edit the content in my <textarea></textarea>, and it works just fine when I post it in my database. Only problem is : how do I echo it ? The parsing method of trumbowyg takes this …
How can I make a page accessible to only admins in moodle?
I have a link on the settings.php page of my activity module that goes to a clear.php page that truncates a table in the database. As it stands even guests can still run this function by going to the clear.php themselves by typing in the address bar. Is there a way to check if a USER is an admin or
Random peaks in Mysql load slowing all users
We have a site that has been working pretty well for the past 2 years. But we are actually seeing random peaks in the database load that make the site very slow for a few seconds. These peaks only appear from a certain load on the server and are impossible to predict. More users = more peaks. Everything run v…
How to create multidimensional array unlimited depth array with parent and child came from single table
Im trying to create multi-dimesional array with unlimited depth. I select the data from the database and check it if the field ‘isArray’ is true, meaning this column is a parent then I tried to make a loop to make it look for its child ‘parent_id’ => $row->id. I’m expecting…
Difference between apk add and docker-php-ext-install in php install?
When I install php from aline, I use the form php-something. Taking gd as an example, I install php8-gd using RUN apk add php8-gd But I also saw an example using docker-php-ext-install . For example, RUN docker-php-ext-install gd This is not only gd, but also mysqli, bcmath, etc. How are the two commands diff…
In PHP, for a specific key in an associative array, find identical keys and combine values into a single string variable
I have found many references for similar questions on SO but nothing close to what I’m trying to do. I have this array output: I would like to now use ‘kp_uid’ to locate all common values and then combine the ‘full_name’ values for each key into a string (with comma separation). …
How to check if all mysql results are equal
I’m facing a difficulty at the moment – I’m working on a real-estate website where the seller has some developments which have individual units within each development (a house with 4 apartments, for example). The development has a status column in the database which specifies if it is Avail…