Questions tagged as 'mysql'

1
answer

Function in MySql to send EMAIL

I want to trigger an email to some clients that I have registered in a table, I did not want to develop an application to stay running this task, I would like to do directly in the database, it is possible to create a function to send direct mai...
asked by 23.02.2016 / 16:18
1
answer

How to execute query at the turn of the day? [closed]

I would like to know if there is any trigger or process that I can at day-end 00:00 change status of installments that have their due dates greater than hoje() . Any suggestions?     
asked by 06.12.2016 / 06:06
2
answers

Error "expects parameter 2 to be resource" when connecting to the bank

I'm trying to make a connection via php to a mysql server but it always has the following error:    Warning: mysql_select_db () expects parameter 2 to be resource, null given in /home/u517649386/public_html/conecta.php on line 6 The code...
asked by 14.11.2016 / 23:43
2
answers

Send data to Database

I have a database with the following primary and foreign keys tb_detalhe_trabalhador id tb_funcoes_id tb_trabalhador_id tb_equipamentos id tb_trabalhador_id tb_funcoes id tb_trabalhador id My last table to fil...
asked by 07.02.2014 / 17:55
1
answer

Show all records in a column

I made a query where I got the result of this query, however what I need is this result shows only one line, a single record but in reality I have more than one: follow the code below and please show me where I'm going wrong because I can...
asked by 11.10.2018 / 20:50
1
answer

How to reduce this PHP / MYSQL function by adding data in multiple columns? [closed]

Hello, I have a private variable $ group_permissions that stores all columns of permissions, they have false or true value, so say if the user is allowed to perform some on the panel. The user marks several checkboxes, and sends them th...
asked by 15.10.2018 / 19:02
1
answer

Timeout for each post

I need a solution to delete a post or a database record in 3 days, in which case the post will be available for 3 days and then deleted. I think of using the following line: DELETE FROM posts WHERE data_postagem (aqui que complica, penso em +...
asked by 24.10.2018 / 00:09
1
answer

Remove space from a column in Opencart

I made a select in the table oc_product SELECT * FROM oc_product in the column sku needed to remove all the spaces of these items are more than 2000 lines with this problem it is possible to remove this dynamically follows a...
asked by 26.10.2018 / 17:33
1
answer

Show MySQL Query Result with Echo (PHP)

I have a script in PHP and MySQL that has a query responsible for counting how many records (clients) are inserted into one of the tables in my database. However, I need to show the amount of records (clients) in the table with the echo command,...
asked by 25.12.2018 / 18:37
1
answer

Warning: Division by zero with dates

How can I calculate a range of dates, for example: 08/24/2017 and 09/05/2017 and get the total amount of days? For example the result of this difference would have to give 106 days difference from one date to another code: $data = $row['...
asked by 09.05.2017 / 23:07