Questions tagged as 'mysql'

2
answers

Problem in SQL statement

I have a problem in my SQL code. Well, I have this function that is in class Usuario : public function CS_GetUsuarios($sql_aux = false) { global $objConexao; $strSql = "SELECT U.*, A.*, G.*, (...
asked by 09.06.2017 / 20:02
1
answer

Doubt in SQL Table

I created a table: Tabela Curso: Id int auto_increment nome varchar; Insert: Default, Arquitetura; Architecture has ID 1 in the table. Deleto the Architecture course. When I add any other course, it assumes ID = 2. Is it possible...
asked by 30.03.2017 / 17:00
1
answer

Error inserting data into MySQL table

I'm trying to send data to MySQL from a restaurant reservation, but it only worked the first time and now when I try to send it will not go any further. What is the possible error in my script? Connection File with MySQL : <...
asked by 27.03.2017 / 20:19
1
answer

Returning MySql Table Fields

Hello, I have three tables: profissional (id, nome, idtratamento) usuários (id, nome idtratamento) formulario (id, data, idprofissional,idusuario) and another: tratamento (id, descricao) I need to return the following information qu...
asked by 17.04.2017 / 18:43
1
answer

Error changing charset using MySQL Table Editor from latin1 to utf8

I'm trying to change the charset from a table directly in the database using MySQL Table Editor, from latin1 to utf8 however, when I select utf8 in the charset options it automatically changes the collation to utf8mb4_general_ci and when I apply...
asked by 17.04.2017 / 13:09
1
answer

Bring all the necessary results in a query - MariaDB

I need to reformulate a small system, which works now but opens several connections to the database, and when there are many records, the database crashes, or when this does not happen, the page gets very slow. > So to get around this problem,...
asked by 27.04.2017 / 19:22
2
answers

PHP + MySQL - Syntax error with quotes in String

"When the string has no single quotation marks, this works fine, my problem is when there are single quotation marks" example with single quotes: $name = "Michael"; $store = "Mike's Store"; "INSERT INTO database(name, store) VALUES('$name'...
asked by 12.03.2017 / 17:03
2
answers

How to get value from the serial port?

With the code below I get four values ( 1,2,3,4 ) sent by the Arduino serial port / strong>, 3 or 4 values are not sent together, either 1 or 2 / p> serialPort1.Open(); string entrada = serialPort1.ReadLine(); txtIDTag.Text = entrada...
asked by 09.04.2017 / 23:00
2
answers

Avg per hour MySQL

Hello, I would like to know how to return only the hourly averages of a table as below: id | valor | timestamp | 1 | 5.4 | 2017-4-20 18:00 | 2 | 3 | 2017-4-20 18:01 | 3 | 2.8 | 2017-4-20 18:40 | 4 | 2 | 2017-4-20 19:0...
asked by 21.04.2017 / 23:45
1
answer

PHP PDO - MySQL query data does not appear in the table

What am I doing wrong in this script? I make a query in the database to return all the data from the curso table and display their names in the table, but it is not working. In addition this part of the code is being displayed on th...
asked by 22.04.2017 / 06:19