Questions tagged as 'mysql'

2
answers

Column of unknown subquery

Could someone help me with this query? He says that the column "hasNovedadHoy" is unknown in the clause WHERE , however if I remove it from WHERE and leave it in ORDER BY , It works. But I think that if you recognize it...
asked by 29.05.2018 / 04:02
1
answer

Show records grouped by month in a MYSQL query

I have the whole system created, only the reports are missing, the main table is averias which has as attributes campo , fecha and other irrelevant, the SQL I have so far is as follows: SELECT centro, MONTH(fecha) as mes, C...
asked by 29.05.2018 / 03:20
2
answers

Warning "Undefined variable: row in ..."

I have tried to follow a tutorial and adapt it to the need to autocomplete a form by means of an input (with Send button). I get the error:    Notice: Undefined variable: row in C: \ xampp ... \ patientsearch.php on line 61. It also sh...
asked by 29.05.2018 / 06:16
1
answer

Can you relate 2 tables of different databases by means of a foreign key?

I have 2 database Mysql which can be ejemplo1 and ejemplo2 , one of which ejemplo1 I can not touch its structure at all so I was forced to create my own ejemplo2 , the issue is that the first ejemplo1 has...
asked by 30.05.2018 / 18:12
1
answer

MYSQL procedures

delimiter // create procedure elimdato(in id_emple int(6),cp varchar(5)) begin DELETE FROM empleado WHERE cp=cp; end // call elimdato(1,40855); At the time of executing this procedure, I delete all the information of the table used, I woul...
asked by 31.05.2018 / 03:00
1
answer

How to show records of 2 related tables?

I have a CRUD with multiple files, create 2 tables, one is an activity where all the data goes and another image where only the files associated with the activity go. The problem happens that if user wants to add 2 or more files to the act...
asked by 01.06.2018 / 01:44
1
answer

Query all of a user's sales with totals

I am developing with PHP-PDO with MySQL and I have three tables: User (Seller) Sale Detail Sale How can I make a query in MySQL that shows me per user the detail of all the sales made (product, quantity, price, subtotal, *) plus the...
asked by 09.06.2018 / 03:37
1
answer

In laravel Is it necessary that the tables have the "created_at" field as the "updated_at" field?

Is there any way I can create those two fields from my console and how can I do it? I must clarify that the database was already created for me, now I have to implement it in this framework     
asked by 24.06.2018 / 19:24
2
answers

Update with Inner join

I am trying to update a "group" attribute of my process table, I do the relationship with the subprocess table which has as reference the idProcess of the process table, but it marks me an error when executing the query. UPDATE P set P.grupo="...
asked by 27.05.2018 / 02:12
1
answer

Problem when extracting data

I have Menu (food) within those menus I have submenus (first, second, etc) and within submenus I have dishes. The submenus I generate them perfect and as soon as the dishes always fill them with the last dishes of the last submenu id with whi...
asked by 16.05.2018 / 15:54