Questions tagged as 'mysql'

1
answer

Delete repeated records in a select in Mysql

I have the following select SELECT correo_persona FROM tb_extintores INNER JOIN tb_cliente_normal ON rut_cliente = rut_persona WHERE fecha_vencimiento BETWEEN '2018-09-11' AND '2018-12-11' that brings back customer emails. but sometimes the...
asked by 29.11.2017 / 17:22
3
answers

Replace data in a MySQL column

I have the following table Computers I want to replace only the department column with a text string. And I am using the following query: UPDATE computers SET departamento = REPLACE (departamento, (1), "Administración"); UPDATE...
asked by 22.11.2017 / 17:42
1
answer

error Undefined index in php

in php, I get this error    Notice: Undefined index: user in C: \ xampp \ htdocs \ exemplification \ consultusuario.php on line 4 first php <!-- consultarUsuario.php--> <?php include('functions.php'); $user=$_GET['user'];...
asked by 14.11.2017 / 16:25
1
answer

Upload MySQL PHP server image - form / data

I have a form to upload the data of a cabin to a table called "cabins" and the images chosen through the input property "file" to the table "images". The problem I have is that I do not upload the images. What am I doing wrong? Screen ou...
asked by 07.12.2017 / 17:21
1
answer

Why does not this sql query work for me?

The first_advisory column is of type DATE, I put an image of the records entered so far: Making this query: SELECT primer_aviso FROM tabla_principal WHERE 'primer_aviso' < '2017-12-01' Is not it supposed that only records that a...
asked by 18.12.2017 / 18:30
1
answer

Calculate the difference between hours in SQL

How do I get a difference between two hours? For example, between 07:30 and 09:00 , so you can tell me the difference in minutes, seconds and hours.     
asked by 05.11.2017 / 08:43
2
answers

instance running with data distributed on multiple disks

I have a hard drive that is filling up and I'm going to add another one. On that hard drive I have a MySQL DB and I want to know if placing another HD can, with that same instance of MySQL, store tables on the new disk, or if I have to have 2 in...
asked by 30.10.2017 / 10:46
1
answer

Can not I make this inquiry?

I want to add the values that are in VLR_TOTAL where NOMBRE equals Expansion and NOMBRE equals Mantenimiento. I have the following query: SELECT SUM(VLR_TOTAL) FROM bodega_moviles WHERE NOMBRE = Expans...
asked by 31.08.2017 / 16:52
2
answers

Insert current date in a mysql table - php

I have a question about inserting the current date in a row into a mysql table in case there is no such record. Example: Insert 2017-10-10 in a row if it does not exist. But insert a new record in case it's another day like tomorrow (2017-10-11)...
asked by 10.10.2017 / 21:25
3
answers

How can I get the total sum of a column in a mysql table?

I have a product table and I wanted to do the sum of the row price in php How should I write the code select? Try to do it that way: $consulta="Select SUM(precio) FROM productos"; It does not work. Help.     
asked by 05.09.2017 / 15:41