I use the following excerpt for one queried to the database
$cs1 = $pdo->query("SELECT TITULO, URL, IMAGEM , TEMPO FROM post ORDER BY CLIQUES DESC LIMIT 5")->fetchAll();
I would then like to explore this query further in order to use...
I have already looked intensively for a solution to show the result of a mysqli query within an html, but I can not find anything. I saw that it is possible to present the result through one with the help of fetch_assoc () in php, but what I wan...
I'm running the following query directly from the phpMyAdmin :
SELECT
shop.id AS cart_details_id,
shop.id AS cart_id,
e.name AS client_name,
e.nif AS client_tin,
e.addr AS client_address,
CONCAT (e.zipcode, ' ', e.zipcodeext) A...
SELECT pga.Titulo, e.Codigo
FROM Qualidade_Diagrama_Processo_Grupo_Acao pga
JOIN Qualidade_Diagrama_Acao_Entidade ae on (ae.Id_Proc_Grupo_Acao = pga.Id)
JOIN Qualidade_Diagrama_Entidade e on (e.Id = ae.Id_Entidade)
WHERE ae.Id_Pro...
Good afternoon!
Personal, in my table log has a field called logdescricao and in this field it stores several expressions. For example:
<log expressao="7085"><par traduzir="N">André Mariano da Silva</par><par traduzir="...
How would a query make the selection between two tables according to the value of a specific column?
For example: I have two tables that contain account number and Balance, I need to know which accounts are not with the same balance.
Tab1...
I have the query below where it is done on the current day, how could I make the same query in the current month until today, example: 01/09 13/09 but so that the query tomorrow is: 01/09 to 14/09 and so on.
SELECT
o.numero...
How to update the values of a table, using values taken from another table:
UPDATE produto -- atualizar a tabela produto
SET produto.quant = SUM(entrada.quant) -- produto.quant será igual a soma da coluna quant da tabela entrada
WHERE pr...
I'm trying to run this code but it's not working.
$sql = "SELECT * FROM cliente WHERE id = $id ";
$limite = mysql_query("$sql");
while ($sql = mysql_fetch_array($limite)){
$nome = $sql["nome"];
$telefone = $sql["telefone"]...