I made a query select like this:
SELECT
data,
sexo,
idade,
count(*) qtd
FROM marcacao
group by data, sexo, idade
And I get a table similar to the table below:
DATA | SEXO | IDADE | QTD
01/07/2017 | F | 30 | 3
01/07/20...
I'm trying to check if there is a record in the mysql table using php,
I have the table "slug", and in this table I have "id" and "slug_name", as I do to check if there is already a name in this table, for example: noticia_sobre_o_tempo.
how...
I have the following table in a mysql database:
Iwouldlikeacommandtoruninphpmyadmin,addthecurrentvalueoftherating_sumcolumnto5,andrating_countto1,thus:
I want to add these values (5, 1) to all table rows, without any restrictions. I tri...
I'm having a problem when dealing with two tables, tb_adm_anuncios and tb_adm_anuncio_banner .
For each ad I have 4 banners, and to list those ads I need:
**Anúncio:**
-Nome do Anúncio
-Link
**Banner:**
-Imagem
The command...
I have a monitoring system. Retrieves the user's location every 5 seconds. However, I want to show only the records that appear in the range every 15 seconds (for example). The main idea is that it is dynamic, where the user of the system can ma...
I have the following code:
$sql='ALTER TABLE tributos_prod AUTO_INCREMENT=:ultimo_id';
try {
$query_delete=$conecta->prepare($sql);
$query_delete->bindValue('ultimo_id', $ultimo_idTP+1, PDO: : PARAM_STR);
$query_delete->ex...
I have the following question, I need to return in a panel that there are records that are not being displayed on the screen. Type I have 10 records being displayed, are registered 2 more then I need to show a notification similar to that of Fac...
How do I resolve this situation?
$q = mysql_query("SELECT *, COUNT(*) as total,
SUM(bolas_agarradas+bolas_espalmadas) as defesas,
SUM(bolas_agarradas+bolas_espalmadas+gols_sofridos) as chances,
SUM(defesas / chances) as porcentual ...
Use t...
I have the following code that gives me a table like the one in the picture, but my question is how do I get the name and just the name of the one that has the highest health value that will be the gas? Is it possible to use a NOT EXISTS in this...
Well, I currently use the MySQL Workbench software to make my scripts, I wanted a lighter program, does anyone know / could give me some alternatives?
I do not want PHPMYADMIN
Note: I'm developing with PHP - I do not know if that influence...