Questions tagged as 'mysql'

1
answer

Make monthly report of sql data

How can I get monthly data for example from day 1 to 1 or if it is in the current month from day 1 to the current one. Having a table such that: +---------------------------------------+ | id | estado | fecha | +------+---...
asked by 13.02.2017 / 09:37
1
answer

ERROR 403 when uploading my page to my web server

Hello everyone, I have a 403 error (Forbidden), which occurs when I make a request via jquery (ajax) to a php. The funny thing is that I miss this error when I try to save a css tag on the server (background-image: url ('')). and it does not hap...
asked by 14.02.2017 / 22:35
2
answers

Query to display data from a single user of MySQL tables

I need to show on my page the contents of a table according to the user who has logged in. I am including the connection and the consultations where I must access to show me the user's data, which are already loaded in the fields of the tables i...
asked by 10.06.2017 / 08:03
1
answer

When joining three mysql tables, one record appears duplicated

As you can see, the problem is that the genres appear repeated, although the number of times that is repeated is correct Note: I already solved the problem, the group by was the one that was interfering SELECT serie_db.nombre,rat...
asked by 08.03.2017 / 16:59
1
answer

Restore a mysql database in java

I have problems trying to restore a backup of a java database ... I have the code: public boolean importar(String ruta){ boolean bnd=false; String sentencia = rutaMySQL+"mysql -u "+user+" -p"+pass+" "+bd+" < "+ruta; Runtime rt =...
asked by 14.01.2017 / 06:20
1
answer

Show name of a record using the ID found in another table [closed]

I have two tables: Personal: cedula, rango_id Ranges: range_id, range (field with range description) I would like you to modify the staff where your rank is selected your ID would not appear, like, 1 2 3 4, but the description tha...
asked by 18.01.2017 / 16:32
1
answer

Registration system does not save anything in the database by mistake while

I have the following data logging system, although it seems that everything works fine, do not insert the data in the database: Conexion.php      $cone = new mysqli($host,$usua,$pass,$base); if ($cone->connect_errno) { echo "Falló la...
asked by 18.01.2017 / 01:22
1
answer

Get the last ID of a table 1 and then insert it into a table 2 using PHP

I have two related tables and I want to get the last ID_primeraTabla to insert it in the second table since the ID_primeraTabla is the foreign key. any ideas ? What I have is the following $pregunta = $_POST["pregunta"];...
asked by 01.02.2017 / 20:16
1
answer

Variables and temporary tables in SQL, exercise

This exercise was presented to me: Show students who have enrolled in more courses than Antoine de Saint-Exupery. Show all the data of the students, the number of courses to which they enrolled and how many times more than Juan Perez. The...
asked by 16.12.2016 / 19:14
1
answer

SQL exercise with subqueries / variables

I have a problem and I do not know how to solve it in this exercise. It says: What people were hired by any of the companies that hired Stefanía Lopez? The tables present are: People: direccion apellido nombre dni telefono fecha_nac...
asked by 15.12.2016 / 19:16