Skip to content

Tag: mariadb

Get a group of records by last unknown id

I have a log table where I want to select the entries for a specific group of records that are grouped by an id I don’t know. See the table below, there are more columns but these are not relevant for the question. I want to get the last entries of one process for one device When I query something

How to compare database data in php

I want to compare the database data in the php. This is my table hospital_payment_data table cash_receipt_publish table This is my sql syntax in this web page result I Want result If the date and the amount match or the amount match, I would like to express it as False by comparing the table with the table in…

How to make a workable SQL request for NodeJS file?

I have a js file to work with my local database, and a POST request is not working like it should – if I enter a specific row, it returns a correct result, but I need it to get the variable from post data. This type of entering query doesn’t work 🙁 Answer You can try to use the “Prepared

number of appearances of an atribute before a date in a query

I have this table and what I need as an output is to have for each payment the number of payments that have been done with the same credit card. For example, for the first payment there would be 0 payments with the same credit card. for the second payment there would be 1 payment with the same credit card.

SQL – Selecting from a multiples values field

I’m using Teampass, here is a minimised example of the tables schema Teampass_Roles_Title : and Teampass_Users the numbers in fonction_id are the ids from the table Teampass_Roles_Title Instead of using an intermediate table, they opted for this model, and I dont know if there is any way to have for exa…