Questions tagged as 'mysql'

1
answer

Create a trigger to trigger whenever a field is edited mysql

Good colleagues, I have a problem that I still can not solve. I want to create a trigger that whenever the column of quantity of product undergoes a update it triggers an action for another table, to allow the user to know that a certain product...
asked by 31.07.2018 / 12:12
1
answer

Create a new table for optional values

Having trouble creating a new table for fields that are not required? For example in the address table (cod_endereco, pasadouro, cep, number, complement) where complement is an optional field, and when a user inserts data the table does not have...
asked by 06.07.2018 / 04:26
1
answer

QUERY CODEIGNITER - INNER JOIN

Hello I am using dataTable in codeigniter and doing a query through the search Looking at the query below, it works fine when it comes to query within the same table tb_pagamento . Now I want to query the name of the...
asked by 05.07.2018 / 17:42
1
answer

How to emulate ROW_NUMBER () in MySQL V5.7?

I know this is a common and well documented issue in English, but there is little of it in Portuguese. So I'm going to seize the opportunity and narrow down this question in a simple and comprehensive way. Let's assume that we will work with...
asked by 13.10.2018 / 00:53
1
answer

Foreign characters saved in MYSQL

My system is powered by an XML file every day. When saving to the database, MySQL saves in a way and when I redeem this data using PHP it is displayed on the page as follows: Beingthatinthese"crazy" characters, it is only a simple "-."....
asked by 02.08.2018 / 17:38
2
answers

Problem with Php and mysql - Simple login

Good evening! I'm making a simple website, which displays a box with username and password that will be sent by form via the post method to the valida.php page . When comparing the user and password entered by the user, with the user and...
asked by 20.08.2018 / 03:04
1
answer

Split query result into columns

I have a select that brings items with prices, how do I split the result into two columns:  Examples: Ihopetoleaveitasfollows: Here'smycode:<html><head><metaname="viewport" content="width=device-width, initial-scale=1.0">...
asked by 21.08.2018 / 22:20
1
answer

mysqli num_rows expects parameter 1 to be mysqli_result

Hello, I'm a beginner in PHP and MySQL and I'm in need of help. I'm getting the error that is in the question title in my login function: public function login ($login, $senha) { $result = $this->conn->prepare ("SELECT * FROM...
asked by 30.08.2018 / 16:23
1
answer

Valid working hours

How do I calculate the time spent on calls taken by an employee? But always within the valid work schedule, and knowing that an employee's work schedule is between 08:00 and 18:00. For example: table named_status_log. ______________________...
asked by 26.07.2018 / 15:04
1
answer

Add null value Laravel

I'm trying to do the following sum with Query Builder, but if one of the values is null and not sum DB::raw("estudantes_carga_horaria.dias_letivos_oferecidos + estudantes_carga_horaria.dias_letivos_oferecidos_outra_escola AS total_dias_letivos...
asked by 27.06.2018 / 13:17