Questions tagged as 'sql'

1
answer

I can not connect to the MySQL database with Slim

I'm doing a test and I want to connect to the database Tarea2 and show the table EMPLEADO but I can not connect. My user is root , for simplicity of the task I do not have passwords This is my code. $app->get('/EMP...
asked by 09.08.2018 / 21:27
0
answers

Update SQL table with Excel document

This problem I found it many times, and I think to do a project that solves this in the most modular and clean ways possible (but I think the first thing is that it can be xD) I want to perimero update the table "names", this table has the va...
asked by 09.08.2018 / 20:34
0
answers

create mysql trigger

I have a problem with the following trigger CREATE TRIGGER DEPORTES_AFTER_INSERT AFTER ISERT ON CONTENIDO FOR EACH ROW INSERT INTO c_deportes (c_id, c_titulo, c_descripcion, c_categoria, c_fecha_entrada, c_contenido, c_imagen, c_nombre_i...
asked by 22.05.2018 / 19:42
1
answer

Query with eloquent amount and limit to obtain

Hello, someone could help me with an eloquent query. User::with(['post','Y aun tengo más relaciones. ..']) ->where('nick',$nick)->first(); This way I get the information of a user X and I see the posts. but I need only show the las...
asked by 30.10.2018 / 02:58
0
answers

Add the GROUP BY clause

I am working with SQL Server 2014 Express Edition and I have the following query. SELECT DISTINCT T.ProductoCatalogoId AS Id, T.ProductoId, CONCAT(T.Nombre, ' | ', T.TALLA, ' | ', C.COLOR) AS Descripcion, T.PrecioVenta, T.CATALOGO AS Nombre FR...
asked by 11.12.2018 / 18:10
0
answers

Select DB2 Queries

Good morning, By making a query in my DB2 Database, we noticed something curious. When I query a Table depending on the where condition, it displays the data. SELECT NOMBRE FROM X WHERE NOMBRE = 'aaa ' Result: "aaa_" - >...
asked by 31.01.2018 / 15:20
1
answer

How can I send Excel from sql server?

Good Night. I'm exporting an excel file to my email from SQL SERVER 2012 Why, if it generates me and my email arrives to me the excel the bad thing is that it comes out in a single cell as the image that I attached Would there be a way to for...
asked by 18.01.2018 / 01:12
2
answers

Doubt over hash, md5 and unencrypted

I had a doubt. I have a login where I have a password with hash and the login is valid as such. If I enter a password directly without encrypting in the database or I do an update of the password with md5, would there be any kind of problem i...
asked by 19.08.2018 / 16:21
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

Laravel 5.4 MySQL 5.6.35 - The famous # 1215 - Can not add foreign key constraint

Creating a migration in Laravel 5.4 with MySQL 5.6 I can add an external reference perfectly if it is on the Id of another table, but I can not add it on a string index. This works well on the Id field CREATE TABLE 'stock' ( 'id' int(10...
asked by 04.09.2017 / 19:16