Questions tagged as 'mysql'

1
answer

Differentiate 2 users within another table [closed]

I have a dilemma, I have two initial tables; user and car . The car table has a column called cash_car that contains a total of money in whole number. I need to differentiate the total that each user has entered (in this case only two)....
asked by 31.10.2017 / 01:05
1
answer

How do I execute a procedure in laravel?

What kind of friends do I come to ask for your help, I am working on laravel 5.4 for some issues I have to execute a stored procedure that performs an insert and returns the id of the saved record, my question is how do I receive the id that ret...
asked by 20.10.2017 / 06:17
1
answer

Control error when connecting to my MySQL database

I have the following code to make the connection to my MySQL database, what I want is to control the error that appears when I try to run the program, I miss the error / warning that the Xampp is off. I would like to know if there is any way to...
asked by 22.10.2017 / 13:23
1
answer

error when creating relationships in mysql

when updating the data id_estado in the table tb_extintores all the data are updated in the column id state of tb_register_bloqueo_extintor should only update the id_state of a single code not all. I do not know if the relationship is badl...
asked by 27.10.2017 / 00:07
1
answer

How to get variables from get by php?

Good afternoon friends of stackoverflow. I have this doubt, in my php code I have a url with variable gets: link I would like to take the variables email and code and through the form that I will present to you later I want to send th...
asked by 04.10.2017 / 20:28
1
answer

Replace variables stored in mySql

Is there any way to replace variables stored in a string of mysql? Currently I want to store different chains like this in mysql:    Dear customer, Thank you for buying in   ".common :: getInfoWeb (" name ")." We have received the paymen...
asked by 16.10.2017 / 10:11
1
answer

Save ID in related table from the main table

I have three tables in my database: At first, I only had the contratos table and recently I needed to add the other two tables, as you will see, there is a field in pagos which is related contratos by fk ....
asked by 25.12.2017 / 23:17
1
answer

Mysql query from Javascript with Ajax

I wanted to know how I can make a Mysql query at a specific time with this watch that I have in Javascript. I understand that you have to use Ajax, but I have tried to include the Ajax part inside the if of the time I want, and everything stop...
asked by 22.09.2017 / 20:20
1
answer

Compound primary key: Illegal offset type error in laravel 5

I am new to Laravel and I do not know how to solve this problem, which is as follows: I have a table like that on MySql: Table: propiedad_x_tipo Columns: **id_tipo_propiedad** int(11) **PK** **id_propiedad** int(11) **PK** As you can se...
asked by 22.09.2017 / 01:41
1
answer

Simulate a kind of FOR EACH in Mysql

Currently I'm doing a query that shows the total of reports of a specific type sent (sent = 1) for each user. The current query that I have works and is: SELECT username, SUM(inf_name='INF_01') AS INF_01, SUM(inf_name='INF_02') AS INF_02, S...
asked by 14.09.2017 / 21:26