Questions tagged as 'mysql'

1
answer

Pick up the time of day

I have the following select to pick up the time of day SELECT '00:00' AS A UNION SELECT '01:00' UNION SELECT '02:00' UNION SELECT '03:00' UNION SELECT '04:00' UNION SELECT '05:00' UNION SELECT '06:00' UNION SELECT '07:00' UNION SELECT '08:00'...
asked by 24.07.2018 / 14:58
1
answer

cron command without using password to access MYSQL database

Good morning, I've been receiving warnings related to a cron that I created in 1 site to update certain data from a mysql database table. The error is as follows:    Warning: Using a password on the command line interface can be   insecure...
asked by 02.07.2018 / 12:37
1
answer

Problem presenting date in QTablewidget in python with PyQt5

I have a program that shows information about products and I wanted to present the date, but when the date appears, this is what it shows: PyQt5.QtCore.QDate(2018, 7, 7) . For those who need this code here: from PyQt5 import QtCore, Q...
asked by 02.07.2018 / 13:45
1
answer

MySql - inner join runs in PHPADMIN but in SCRIPT php does not

I have a small PHP script to interact with MAKERIOD. When I execute the select in PHPADMIN I have the return: "Showing records from 0 - 16 (17 total, Query took 8.0945 seconds.)" SELECT Tbdiario.cn1, Tbdiario.cn2, Tbdiario.cn3, Tbdiario.cn4, A...
asked by 30.07.2018 / 19:08
1
answer

How to insert grouped data from one table to another SQL

I have a 'point' table, with columns (id, pis, date, time), which record the input and output of a product ('pis'). I wanted to group it into another table, where the data, pee and date, are the same group all the 'time' data are grouped into a...
asked by 01.08.2018 / 15:07
0
answers

Turning bank result into JSON into Amcharts pattern

I'm using the Code Igniter framework. I have the following model: public function getVendasVendedor() { $query = $this->db->query("SELECT * FROM vendas_vendedor"); return $query->result(); } My Controller: pu...
asked by 31.07.2018 / 19:01
2
answers

Length of field occupies total value defined?

If the maximum length of a field of type VARCHAR is 65535 (ocupa 65KB) , will it always occupy a space of 65KB in the database for each line even if I put less text in it? EXAMPLE: Does a VARCHAR(65000) field occupy 65kb e...
asked by 26.05.2017 / 19:14
1
answer

Sum of two tables and results display

I'm having problems in this section and I can not resolve "mysqli_fetch_array () expects parameter 1 to be mysqli_result", $Valor = mysqli_query($conexao,"SELECT SUM(Y) AS TotalY AND SUM(X) AS TotalX FROM tabela"); while($rs = mysqli_fetch_arr...
asked by 29.06.2018 / 02:26
0
answers

Accentuation table mysql

Good morning. I have a table in the database and I need to make 2 selects in it: For the first search I'm using this and returning everything I need: SELECT * FROM wp_memoria WHERE memo_de IN ($words) The second, I need to search cas...
asked by 21.06.2018 / 16:18
0
answers

Pass variable into IN

I'm having trouble passing a variable into IN in MySQL - PHP - PDO. In the url it looks like this: /PESO=50&IDADE=18,20 Code: $read->FullRead("SELECT DISTINCT NOME FROM pessoas WHERE PESO =:peso AND IDADE IN (:idade)...
asked by 23.06.2018 / 20:17