Questions tagged as 'mysql'

2
answers

Insert a field of type DATE in MySQL from a query prepared in PHP

Good morning. I have a problem when inserting a date in a MySQL table from PHP with a prepared query. I have the following block of code: $query = "INSERT INTO ARTICULOS (CODIGO, FECHA) VALUES (?, ?)"; $resultado = mysqli_prepare ($conexion, $...
asked by 29.08.2017 / 20:13
2
answers

Execute consultations with INNER JOIN [closed]

I am running queries with several INNER JOIN as follows: $query = "SELECT inscritos.id_curso, cursos_abiertos.curso, cursos_abiertos.horario FROM cursos_abiertos INNER JOIN inscritos ON inscritos.id_curso = cursos_abi...
asked by 26.08.2017 / 15:44
1
answer

How to select data that is not saved in a record?

Greetings, I explain what I'm trying to do: I have students enrolled in courses. But the system must have the ability that a single student can be in 1 or more courses, the problem is not that because when I register other courses the same stude...
asked by 25.08.2017 / 22:21
2
answers

How do I select only one data from a list of records with repeated data?

I am looking for a way to show only the first data of each record that my table has. I have a table called detalle_cuota where: insert the amount of each quota the amounts according to the amount of fees that you say you will hav...
asked by 26.08.2017 / 03:30
1
answer

I can not show data requested by query, it shows the query

I try to show data stored in a db, I am working php as mvc and when I show the screen with the relevant queries it shows me the query and not the data, then I leave a photo. class.Conexion.php <?php class Conexion extends mysqli...
asked by 25.08.2017 / 14:36
0
answers

Error filling select with data from a query, the data appears and disappears!

I am showing in a select the courses in which the student is not enrolled, this is to enroll the student in another course. This select I fill in through a query, the problem is that when I click on add course to show me the form with the sel...
asked by 27.08.2017 / 22:44
2
answers

Problem when deleting data from a table! Does not meet WHERE

I have this problem: when I delete a course from a student I must also delete the outstanding payments of that course, those pending payments belong to a student. The problem is that I am erasing even the payments with condition of paid, and the...
asked by 29.08.2017 / 14:33
1
answer

How to insert multiple arrays using PDO from a PHP form?

Hi, I have a code that works to insert multiple records but only one array, I plan to add more inouts with different arrays but I can not find how to modify the part of the arrays. I imagine that in the case of the sql it would be something like...
asked by 29.08.2017 / 16:27
0
answers

Check with LIKE and NATURAL JOIN but it only brings me a single record

Good evening I have the following query: SELECT producto.id_producto AS modelo,producto.descripcion_producto AS descripcion, mostrar_producto.muestra as stock,marca.nombre_marca AS marca, producto.ubicacion_almacen AS ubicacion,p_unitario....
asked by 29.08.2017 / 02:35
1
answer

Pass value of a selected row of jtable to a jcombobox in java

my problem is the following, I have a jtable loaded from the DB and I want to select a row, by pressing enter I am charged a JCombobox that I have in another JFrame which I do: Event pressing enter if ((evt.getKey...
asked by 25.08.2017 / 01:14