Questions tagged as 'mysql'

1
answer

Count and show number of records that meet a condition

Good, as it would be the correct way to know and show the number of records in a table that meet a certain condition. I have tried with the following to show the number of records without any condition but it shows nothing. <?php $sq...
asked by 27.01.2018 / 10:51
2
answers

Error in MySQL stored procedure - Python

I have this procedure in MySQL: sql_procedure = """CALL INSERTAR_OPORTUNIDAD(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%...
asked by 03.08.2017 / 22:18
1
answer

Request records that match a time interval in MySQL

I have a table where I make a record every minute. The column where I keep the time of each insertion is of type TIME . I want to make a query that I select the records that with an interval of 2 minutes. I mean, show me something similar to...
asked by 07.07.2017 / 20:45
1
answer

Increased memory usage of my program in JAVA SE

I have created a simple program in JAVA SE with NETBEANS where I have 3 buttons and every time I press a button I send information to my database, at all times I have the connection open and every time I press the button //Creo la conexión st...
asked by 27.03.2017 / 11:49
2
answers

Problems to consult PHP night data

I have the following query to show the average temperature and relative humidity of the last two nights from the current date: SELECT DATE(date) AS Fecha, ROUND(AVG(temperature),2) AS Temperatura, ROUND(AVG(humidity),2)...
asked by 29.09.2016 / 14:25
2
answers

Build a table with start and end dates of period

Hello! I have a table with the following structure: id | fecha_inicio ---+-------------------- 10 | 2016-12-01 10:15:00 10 | 2016-12-03 16:02:00 11 | 2016-12-02 11:23:00 I want to build a query that has the beginning and end of the perio...
asked by 02.01.2017 / 18:07
2
answers

MySQLWorkbench-How to concatenate numbering of lists that are re-enumerated when changing the value of a field with values of a field of another table?

Good morning, my question is somewhat complex. I have the following code (Very grateful McNets for the help with the formula). : select @cid := case when @poblacion = poblacion then @cid + 1 else @cid := 1 end as cid, @poblacion...
asked by 13.01.2017 / 19:24
2
answers

bash script closes without further execution

I have a script that worked quite well to date. This makes several simple queries to mysql and then acts on a table of several million records by deleting matches with another table. The issue is that the last job was much heavier than the pr...
asked by 21.08.2016 / 14:01
5
answers

Method Save to Java with classes

I'm doing a java project with forms which I have to save and delete for this I think a class that is the class connection a different class for each of the forms in which the different methods of saving modify and eliminate and the forms. but...
asked by 30.12.2016 / 18:18
1
answer

Store a MySQL SQL Query in JSON

the query is the following I have this query: Edit > Added Query in PHP: if (!($resultado = $conexion->prepare(" SELECT facturas.*, renglones.producto, renglones.cantidad, renglones.precio_unitario, renglones.tot...
asked by 13.10.2018 / 06:25