Questions tagged as 'mysql'

1
answer

Send more than one record to the same record in the database

I have a dependents registry with the form sending correctly to the DB. I came across the problem that I did not realize that the worker can have more than one dependent, I would like to know how I can add more than one dependent to the employee...
asked by 13.03.2018 / 19:25
1
answer

Concatenate two functions! (MySQL / PHP)

I have two functions that I did to display data in a table. But I was not able to create this function in a single function, so I created two, but when I call the two in the foreach it is displayed 4 times for each die. Here are both function...
asked by 09.05.2018 / 20:25
1
answer

select with multiple BETWEENs

Good people, I need a help, I'm doing a filter and to do the select I did so: $molcomp_query="SELECT * FROM stock_comp WHERE (diametroaco BETWEEN '$d1' and '$d2') AND (comprimentototal BETWEEN '$comp1' AND '$comp2') AND (diametroexte...
asked by 10.05.2018 / 10:35
1
answer

PHP does not give error, but does not register correctly

I have a login, that if the user logs in from another cell phone, I register the new playerID (onesignal) on my DB. The login works fine but does not register the new playerID. And not of the mistake at all, it just does not register. Foll...
asked by 11.05.2018 / 20:02
1
answer

Pass MySql query to Eloquent Laravel

I have a query that when passing to eloquent returns me a syntax error. SELECT order_id FROM timelines WHERE order_id NOT IN (SELECT order_id FROM timelines WHERE supplier_approved_id) AND supplier_id = 2 GROUP BY order_id Eloquent: Timel...
asked by 06.01.2018 / 18:53
2
answers

Query SQL Server - Union

asked by 08.01.2018 / 14:27
1
answer

Pick up and list months between dates of different years

I have the following question. Initial Date: 01/10/2017 and final date 01/10/2018. How can I list the months between these dates? For example: October (17), November (17), December (17), January (18) ... and so on until September (18).     
asked by 20.12.2017 / 13:40
1
answer

Insert mysql query value into a comma-separated array

I'm trying to insert a result of a query made in MySql into a comma-separated array, but I'm having trouble doing so. I have this query: SELECT 'gasUsuarioUnicoopSis'.IdUnicoop FROM 'gasUsuarioUnicoopSis' WHERE ('gasUsuarioUn...
asked by 12.12.2017 / 21:37
1
answer

Registering the value of a variable in a table

I'm trying to save data from 2 variables in a table, but when I look at the table in the database the values are recorded as 0. public void inserir(List<Conta>list) { List<Conta> lista = new List<Conta>();...
asked by 24.02.2018 / 21:26
1
answer

MySQL - Foreign Key Constraint between Tables

Below I've created 4 fictional tables for illustration The Teacher and Student tables are referenced by Address and Documents. However, how can I create a foreign key in the last two tables that Professor OR Student references? If I create a...
asked by 26.12.2017 / 19:58