Good morning
I have the result in MYSQL
01
03
04
06
11
I need a solution that fills in 2 zeros where it loses the numerical sequence up to number 12.
Example:
01
00
03
04
00
06
00
00
00
00
11
00
The SQL below brings the number of entries made month by month, until then blz.
I needed to show the last 6 months, even if it was zero, but in this select it would only bring up when there are records.
select
extract(month from data_cad) a...
I have the following tables in my MySQL DB:
produtos_pedido with the following fields
id, order_id, product_id, qtd
produtos_troca with the following fields
id, order_id, product_id, qtd
I need to make a S...
I need to Concatenate variables of an array, to execute a SQL, this array can have differentiated values. If the array is greater than 1 then it must have $ variable + $ variavel02. If the array is equal to 1. Then just play the variable.
$arr...
I have the 'category' table and an 'id' column, with more than 100 records in that column.
How do I add a value to all of these records? In case the value would be '3'.
I'm trying to insert a row in mysql but it's returning this:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO
The data field is of type varchar , in June the date format is DD/MM/YYYY , but wanted to change it to YYYY-MM-DD since it is the format that MySQL accepts and to follow the current standard of July.
After I swi...
I am a beginner in MySQL and have registered a table in PhpMyAdmin , where id is int , and all other fields are text , including data_cadastro field. I was in doubt, because there were several types of fields with...
In Mysql I have the table usuario , with the fields ID and CPF :
IreceivedalistofsomeCPFsfromtheclientandwhatIneed:SeewhichoftheseusersisNOTintheusuario_gerenciamentotable,theproblemisthattheusuario_gerenciamentotabledoesn...
I would like to know how I can get values from a mysql database where the data obtained must be in one table and not in another.
For example: I want all equipment (table equipment) that is not reserved (table reservations)