Questions tagged as 'mysql'

1
answer

How can I get the first value of several related tables?

SELECT pr.nombre AS 'nombrePrograma',pr.id FROM programas pr JOIN cursos ON pr.id = cursos.programa_id LIMIT 1     
asked by 01.11.2018 / 17:47
0
answers

Save fields of the selected table by checkbox in Mysql made in PHP

Good afternoon I am new again in the forum, help me with a problem that I have, I want to save the rows of the table that has been selected by checkbox in Mysql made in PHP, I need to save the id of the product, and the amount in My Mysql databa...
asked by 24.06.2018 / 02:05
1
answer

Problem with query select MAX in MySql

I have the following query SELECT h.cod_hoja,p.nombre, p.universidad, d.nombre_diagnostico, h.hojaEvolucion, h.planEvolucion, h.fecha_consulta, h.hora_consulta FROM hoja_evolucion as h JOIN paciente_hoja...
asked by 15.12.2018 / 04:07
2
answers

Improve the response time of a LEFT JOIN in Mysql

(I correct the graph The employee_location table only has reference to the location) I have the following tables that allow me to obtain the location of an employee The Employee_information table may or may not have a reference val...
asked by 20.11.2017 / 21:35
2
answers

Validate registered user

I am trying with Ajax to show if the user exists in the database so as not to have two registered users with the same name. What I do is through the event change of jQuery show with a span if the user exists or not in...
asked by 27.03.2018 / 20:56
1
answer

JPA @ManyToMany how to bring related objects

I'm mapping two objects: Professor and Vehicles, it's a n to n relationship so I'm using a relationship table called "rel_prof_vehicle". The problem comes when it comes to obtaining any object Professor or Vehicles, it brings me the whole object...
asked by 27.03.2018 / 22:08
2
answers

foreign key problems

I am making a database that houses public transport data and I have a small lack of focus this is my SQL: CREATE TABLE IF NOT EXISTS 'prueba'.'lineas' ( 'idlineas' INT NOT NULL AUTO_INCREMENT, 'numero' INT NOT NULL, PRIMARY KEY ('idlineas...
asked by 19.08.2018 / 18:59
1
answer

Run MySQL query on onChange

I have a select that shows the departments: <select name="dpto" id="dpto"> <option value="3">ATLANTICO</option> <option value="12">CESAR</option> </select> What I need is that when selecting...
asked by 21.08.2018 / 21:21
2
answers

Error of undefined variables

I'm trying to insert some data into the database, but I get an indefinite variable error in the index, I'll leave the code in case you see any error: File add: <?php session_start(); $equipo = $_POST['equipo']; $idequipo = $_POST['idequ...
asked by 21.08.2018 / 14:33
0
answers

enable PDO module mysql and php in godaddy

I have a windows classic hosting with iis and php 5.3 in godaddy there my website connects to a mysql database this is my connection <?php $dsn = 'mysql:host=dbgts.db.2365702.3ed.hostedresource.net;dbname=dbase'; $username = 'user'; $pa...
asked by 14.09.2017 / 17:55