Skip to content
Advertisement

Tag: mariadb

NewRelic not capturing database queries

NewRelic not capturing database queries. Other queries are ok, that is a signal that the agent is running and everything is ok. However, I can not see the database queries on the explorer, I just have the PHP agent. Do I need the database agent running? Answer Check out the PHP agent docs to validate if your service is running

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 very

Get the final price with discount but only if column is not NULL. SQL

I use these sql tables with these columns: customers: id name phone adress etc.. 1234 Test Name Test Phone Test Adress etc data. orders: customerid orderid orderdate 1234 OR_1234 2022-1-1 orderitems: (in this table one customer can have multiple rows(items) id orderid productid 1 OR_1234 P1 products: productid productprice currency qty name weight P1 10 USD 1 TEST 0.2 KG

PHP/MariaDB On Duplicate Key Update with nested JSON array

So this one is fun. I’m integrating a 3rd party POS into my custom inventory management software I made for this client some time ago. My system is a basic PHP/HTML/JS background. I have webhooks from the 3rd party system sending my site JSON information about product info and stock details. The issue I have is that when we update

How to find a time between nested Json

I have created a table called ticket_manager with the following structure: Each time when the user based QR Code gets scanned it will add a new row (either when it’s a check-in it will add a new line to “checkIn with “check_in_$count” or a new line to checkOut with “check_out_$count” -> So for example “check_in_0 is a pair with “check_out_0″so..

PHP MYSQL Select OneToMany as a nested json

I’ve two tables, one being the Customer table and the other the Address table having a one to many between them. I want to select all customers with their respective addresses and displaying it something like this: My code is the following now: But it results in two records with same data but different address property. How could I achieve

Advertisement