Questions tagged as 'mysql'

1
answer

How can I autollen 2 inputs depending on what I select in a dropdown?

I have a dropdwon which shows as options the fields of a table in mysql, up to here everything is fine. I also have 2 inputs which I want to fill according to what is chosen in the dropdown. The information with which I want these inputs to be f...
asked by 16.05.2018 / 22:38
2
answers

Add 2FK in a single table

I have these tables: mysql> describe clientes; +----------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------+-------------+------+-----+...
asked by 13.05.2018 / 10:03
1
answer

Limit number of data to be inserted in the mysql database

I insert a name from a form into a database that represents the participants of a workshop. In the workshop there is only room for 30 people and try to limit that with the COUNT (*) function. My problem is that the form keeps sending data even i...
asked by 14.05.2018 / 01:23
2
answers

Change color column date in mysql and php

I have a field in a table in my DB that is called fehca, my question is how can I make it show in my php statement change color depending on the condition of the date, for example If 14 days have passed since the date the color shown will be red...
asked by 22.05.2018 / 23:38
1
answer

Obtain dependencies of a view

I need to get the dependencies seen, that is, which objects of the database need to be created before the view in question. Example: Tables Functions Views (if it depends on another view) I tried to consult the table information...
asked by 23.05.2018 / 20:53
1
answer

FK from the same table, show data

Could someone help me with the sentence? I would like the nIdePadre = '1' to show in another column the description of nIdeArea = '1' , and more or less it looks like this: nIdarea --- nIdePadre --- nIdeEmpresa --- VDesc...
asked by 22.05.2018 / 19:33
1
answer

Error php mysql

I have the following code tells me the errors:    mysql_query () expects parameter 2 to be resource, string given in   C: \ AppServ \ www \ tableentradaysalida \ index.php on line 35    mysql_error () expects parameter 1 to be resource,...
asked by 23.05.2018 / 00:12
1
answer

Update file field from PHP in MySQL

I have a table that stores the names of those responsible for some minutes, so once the minutes are signed I upload them so that they are included in the column of the person in charge. But when trying to upload the record, this appears:...
asked by 25.06.2018 / 17:44
2
answers

Laravel Bring data of the model grouped by months

Hello, I have the following table in the DB Fruta id | name | precio | fecha_compra I would like to bring the total price of all purchased fruits grouped by months using eloquent or querybuuilder the result that is but is the following...
asked by 27.06.2018 / 23:06
2
answers

Increment 1 to each item in a list and save it in the database

The problem is this: I have a table in the database with a field position which receives integer values, then I load a list with the data of my table, now I need that when inserting a new record in the position 1 and if position 1 already exists...
asked by 10.05.2018 / 22:24