I am making a very simple private (just between two people) chat system with PHP and MySQL, Jquery and HTML / CSS.
In the database, the table has the following structure:
id (int)
remetente (varchar)
destinatario (varchar)
texto (text)
horario...
I have the following query:
SELECT distinct CAPA.COD_HOLDING,
CAPA.COD_MATRIZ,
CAPA.COD_FILIAL,
CAPA.ID_NF_ENTRADA,
CAPA.NUM_NF,
CAPA.DT_ENTRADA,
CAPA.DT_EMISSAO,
CAPA.COD_CLIFOR,
CAPA.COD_UF,
CAPA.CGC_CPF,...
I'm trying to get a total of the grouped requests by date as follows
SELECT
sum(pit.preco) AS preco,
sum(pit.quantidade) AS quantidade
FROM cliente c
LEFT JOIN erp_pedido ped ON ped.id_cliente = c.id_cliente
LEFT JOIN erp_pedido...
I have the following problem:
I have a table with a list of values for a composite key. Here's an example:
ID | ItemCode | Localidade | Preco
---+----------+------------+-------
01 | 001 | 001 | 3.5
02 | 002 | 001...
I have a select that returns the equally repeated lines, along with the total. I need to reference this group of ID's to pass as an argument.
The result of my query is the array below. Basically it counts how many lines has Papa Charlie in...
I have thousands of files in hand that have common prefixes in their names, something like:
[Prefix Example 1]
ABC-1.mp4
ABC-2.mp4
ABC-3.mp4
[...]
ABC-999.mp4
[Example 2 prefix]
AAA-1.mp4
AAA-2.mp4
AAA-3.mp4
[...]
A...