Questions tagged as 'mysql'

1
answer

Doubt MySQL Foreign Key

First of all, I'm not an expert, much less with SQL (I'm just taking my first steps on how it should be used correctly). Of course, you can understand if I make serious mistakes. The doubt is the next one: I have 3 tables: networks, people, vend...
asked by 21.09.2017 / 19:46
0
answers

mysql union all result group by

I have this mysql query with the intention of joining in a single table the result of 5 queries, but in the final result only the result of the first select appears, the rest goes to zero, and does not give any error select t.a, t.normals, t.s...
asked by 28.11.2017 / 14:09
0
answers

How to import an EXCEL to MYSQL using Codeigniter? Tutorial

I recently asked about this topic on this website, and since I managed to import the data correctly, and after almost a week searching the Internet, I decided that it would be good to publish a question about it, since the biggest part of inform...
asked by 19.09.2017 / 01:11
1
answer

Complicated MySQL query between multiple tables

Greetings! The Query is about users, comments and the action on the comments (LIKE or DISLIKE). I try, but I do not know how to make the following return: comment data, user data, LIKE total, DISLIKE total, action action: this will be of t...
asked by 28.09.2017 / 01:39
1
answer

I do not enter the values to the DB

I have a form in HTML but I do not enter the data in the Database that I am doing wrong. <?php session_start(); if (!isset($_SESSION['user_login_status']) AND $_SESSION['user_login_status'] != 1) { header("locati...
asked by 27.09.2017 / 22:19
2
answers

Get last record in select filtering by id and last login date MySQL

I'm trying to do a query which brings me the last record in a table where those records are usually or will be repeated. This would be my table So what I'm trying to achieve is to make a query where I filtered by date a...
asked by 27.09.2017 / 04:10
0
answers

How can I do this paging with Mysql [closed]

Well my question is the following. I have 3 tables, product table, product type, category. The Product table is related to the product type table, and the product type table with Category. How can I page a list of products by category? The logic...
asked by 04.10.2017 / 15:21
1
answer

alter table mysql in postgresql

I'm trying to make this modification from MySQL to postgresql: ALTER TABLE documento_autor ADD CONSTRAINT FOREIGN KEY(id_autor) REFERENCES autores (id_autor) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE documento_autor ADD CONSTRAINT FORE...
asked by 07.09.2017 / 19:36
0
answers

Avoid MySQL error # 1442 when inserting and executing a trigger

CREATE TRIGGER 'user_tel' AFTER INSERT ON 'usuarios' FOR EACH ROW TROW BEGIN DECLARE TEL CHAR(14); DECLARE ID INT; SET TEL = (SELECT telefono FROM usuarios ORDER BY idUsuario DESC LIMIT 1); SET ID = (SELECT idUsuario FROM usuarios ORDER BY i...
asked by 24.03.2018 / 05:40
1
answer

Hide data from a table

Good day, as I do so that when I open the next program and at the time of doing any search, I do not get the data that I have stored in the table I have in mysql. This is the program: This is the code of that program: This part creates...
asked by 24.03.2018 / 20:16