Questions tagged as 'mysql'

1
answer

Error building a JSON in PHP

I'm trying to build a JSOn from PHP, but when I put two conditions it does not generate the data. That is, I only need to bring the data of SARA , but when I put them in id_ppl and level at the same time, I get nothing. I do not really k...
asked by 02.08.2018 / 18:05
1
answer

How to select the second and the penultimate item in php?

How can I select the second and the last item in a MySQL table with php. I tried to do the following but limited myself to position 12 of 15, and must show me from position 2 to 14 of 15 in total, the second and the penultimate item. The i...
asked by 30.08.2018 / 04:05
2
answers

Where are the .sql files stored in windows?

I installed MySQL in windows 10 64 bits and I am testing the example databases, download one that they use in an example that I follow, it is called northwind, I do not have it and I download it from the internet, I want to include it so that it...
asked by 15.09.2018 / 21:46
1
answer

How can I execute the following query?

I want to be able to get the name of the months by extracting the month from a field that is called FECHA_RECIBE but in the MySql console it tells me that there is an error near FROM . the rest of the query works correctly. The quer...
asked by 05.01.2018 / 22:07
6
answers

Select multiple rows mysql

I need 3 rows of a table that have certain id. This is my current query that gets only one record $query='SELECT precios.id_precio, precios.precio, precios.descarga, precios.carga FROM wifmaxco_web.precios WHERE precios.id_precio="1"'; $...
asked by 11.10.2016 / 20:54
2
answers

perform query with a condition in mysql

I have a person table and a session and in the session table I have the category column, so I want make a query that ignores people who are admin I have tried these codes and I have not obtained the result I want. create procedure li...
asked by 12.03.2018 / 02:53
2
answers

OBTAIN NUMBER FIELDS MYSQL TABLE

Messrs. GOOD NIGHTS! I want to get all the different null fields of a mysql table, example: select * from client where * client!="NULL" Can you give me an orientation please?     
asked by 31.01.2018 / 01:44
2
answers

Why is the result added twice when using SUM () with JOIN?

Hi, I have the following question and it is that the sum is doubled and I do not know why, it adds twice the result when using SUM() with JOIN in Mysql. Each result comes out double in INVERSION_VALOR comes out 492 instead of 246,...
asked by 05.11.2018 / 23:15
2
answers

How to see the foreign key that a table has

I wanted to ask if anyone knows how to see in mysql the foreign key that has a table, because it seems that with show create table is not seen.     
asked by 26.02.2018 / 23:28
2
answers

help with the UNIX_TIMESTAMP function in mysql

I am using the UNIX_TIMESTAMP function to convert a date to unix format. The date is this: 2018-04-16 12:00:00 when I use UNIX_TIMESTAMP('2018-04-16 12:00:00'); returns 1524225600 that is equal to 2018-04-...
asked by 19.04.2018 / 20:14