Questions tagged as 'mysql'

1
answer

Problem with query to table with inner join

I have a problem I hope someone can help me because I'm going crazy and I can not solve it. I have the following code that I use to consult a table and display the results in a datatable: $joinQuery = "FROM orders INNER JOIN clients on (cl...
asked by 20.10.2017 / 21:57
1
answer

SUM AND COUNT in a query with left join in MYSQL

I have a problem when generating a query in my DB, I am going to explain in an abbreviated form the structure of the tables I want to make this query: **tbl usuario** - id_usuario - nombre **tbl alquiler** - id_alquiler - importe_total...
asked by 02.10.2017 / 17:06
1
answer

Query in slow mysql

I have this query in mysql: SELECT MIN('Dc3') +1 as prox_ean_libre FROM (SELECT 'Dc3' FROM 'Test' WHERE 'Dc3' BETWEEN '".$Eanmin."' AND '".$Eanmax."') t1 WHERE not exists (select null FROM 'Test' t2 WHERE t2.'Dc3' = t1.'Dc3' + 1 AND t2.'Dc3' B...
asked by 12.10.2017 / 18:16
1
answer

MYSQL SELECT possible value of two tables

I have 2 tables, one called 'families' with fields 'id', 'email', and another one called 'progenitor' with fields 'id', 'family_id', 'email' (simplifying the rest of the fields). I need to make a SELECT in which to return the email (if any) f...
asked by 13.10.2017 / 19:16
1
answer

How to validate the number of columns to import PhpExcel?

Good morning, Can someone please explain or tell me how to do it so that they do not let me import files that are passed or have fewer columns than the established ones? Let's say if my table where I'm going to import has 8 columns from th...
asked by 05.01.2018 / 20:11
1
answer

DIVIDATE total values of 2 tables in MySql

In a previous post and with the idea of this forum, I managed to add the values of 2 tables that are identical in the structure.    select sum (AP) AP, sum (T) T, sum (CA) CA, sum (H) H, sum (2H) 2H, sum (3H)   3H, sum (HR) HR, sum (CE) CE, s...
asked by 06.01.2018 / 19:55
4
answers

Add values of 2 tables in MYSQL

I have 2 tables with the same data, one from 2016 and another from 2017, I want to make a query that adds the data of both tables to make the total of 2 years.     
asked by 05.01.2018 / 17:53
1
answer

Show the date in dd-MM-yyyy [duplicated]

Hi, I'm doing a program in Java by connecting to a MySql database When you run the program, you have the possibility to see the data that is stored in the database or add new data. The problem is that I see the date in aaaa-MM-dd format an...
asked by 08.10.2017 / 18:22
1
answer

How to get all students who do not owe fees to the date of the date

Good afternoon I have the following problem with an sql query: I need to get the name and surname of those students who are up to date with the payments of school fees. My query is this but it does not work SELECT CONCAT(pe.apellido," ",pe....
asked by 10.10.2017 / 19:10
1
answer

How to join 2 Json in 1

Hi, I have a php file that generates this: ["1", "Raul", "Martinez", "Perez", "8.2", "0", "masculine", "34", "spring 21"] ["65", "My Current Location", "5 Naucalpan Street", "19.4694766998291", "-99.23297119140625", "19.4689194", "- 99.224...
asked by 10.10.2017 / 18:57