Questions tagged as 'mysql'

2
answers

OBTAIN FIRST RECORD THAT IS REPEATED IN A COLUMN (M: M)

Good afternoon! I want to get the first id of a table M: M with select distint. select distinct is not working. You can give me an orientation how to make the query, please! SELECT DISTINCT tarea_actividad.idTarea ,tarea_actividad.id...
asked by 01.02.2018 / 22:01
1
answer

Validation with PHP and MYSQL

I want to make a report count by the status in which they are, I have two queries one is SELECT orden_trabajo.status, COUNT(id_orden) AS cuantas FROM orden_trabajo ORDER BY status; The result of this gives me the total number of orders...
asked by 01.02.2018 / 18:34
1
answer

highcharts tables

Sorry I wanted to know how to spend a sum of hours thrown at me this query SELECT form_matto.id_tecnico, SEC_TO_TIME(SUM(TIME_TO_SEC(tiempom))) as cuantas, tecnico.nombre FROM form_matto, tecnico where form_matto.id_tecnico in ('1','2','3','4...
asked by 29.01.2018 / 17:40
0
answers

Complex query in Phalcon (INNER JOIN) of 6 tables

Good morning. My question is about how to pass a query made in SQL to Phalcon . This is my query: SELECT pr_employees.doctype_id, pr_employees.id, pr_employees.last_name, pr_employees.last_name2, pr_employees.name, pr_employees.bod, pr_em...
asked by 22.01.2018 / 16:28
2
answers

Relate html and php in a single file

I'm quite new to php, however, my connection to the server is successful, what hinders me is to make a table in HTML with the fields that are extracted from the connection and I want the results to show me the table and something that I'm doing...
asked by 22.01.2018 / 17:02
1
answer

Mysql IN absurdly slow, how to refactor

I have an inquiry like this SELECT destinationCode FROM destinations WHERE destinationCode NOT IN ( SELECT DISTINCT(destinationCode) FROM hotels ); Which is absurdly slow. I read that mysql evaluates the IN subquery for each row....
asked by 22.01.2018 / 13:25
0
answers

PHP form connected to BD MySQL does not pass data

Good Day Friends I have a query I'm very new to PHP so thanks for the patience. I'm doing a project as a practice that contains a product entry form and it connects to a MySQL database, when I enter the data by phpmyadmin if you show them...
asked by 20.01.2018 / 01:42
1
answer

Problem with MySQL with PHP

I do not know how to return each value in a different variable. My code: $query = "SELECT id_tienda,id_prod from prod_tienda where id_prod='$row' "; $result = mysqli_query($con, $query); while ($mostrar = mysqli_fetch_array($...
asked by 20.01.2018 / 11:33
0
answers

PHP combobox mysql

How can I get to fill a combobox in html with mysql data? I have this done but it does not work. <?php //Creando conexion $conexion=mysqli_connect("localhost","root","") or die("Problemas en la conexion"); //seleccionando base mysqli_se...
asked by 22.01.2018 / 19:06
0
answers

Mysql UPDATE is not performed

I have a file in HTML and PHP in charge of updating the information in the database. I have consulted other questions similar to this one and I can not find the detail. This is the code that the update should perform: !DOCTYPE html PUBLIC "-//...
asked by 22.01.2018 / 19:16