Questions tagged as 'mysql'

2
answers

mysql with unique result in PDO

I'm trying to create a query as follows: I have a table in the database with this structure:    name | address | status The status field only has 2 types of values 1 or 0. I want to count all records that have status 0 I made the fo...
asked by 06.03.2017 / 20:32
1
answer

way to perform a SELECT COUNT faster!

I need to make an inquiry to know a total number of operators I own. But the table has almost 18 million records, and it takes a long time to return almost 3 minutes, and that's because I'm doing direct test in the bank. The problem will be g...
asked by 09.03.2017 / 20:04
1
answer

How to transpose the row of a column table

I'm breaking my head with a problem, I need the information from a column, constructed through query, to be transformed into a line (query header). I saw some tutorials and related debts but could not implement: PIVOT - I could not implem...
asked by 01.06.2016 / 23:31
1
answer

MySql - No changes detected

Every time I change a procedure in the MySql Workbench and I try to write and I get the following message (No changes detected) there to work around the problem I delete and re-create the procedure. This is very annoying does anyone know how...
asked by 10.03.2016 / 15:24
1
answer

AJAX appear divs according to database ID (MYSQL)

I'm trying to make every time I press the #buttonIdUltimoItem a structured DIV to get information from the database from the newest to the oldest according to ID . The problem is always repeating the last three IDs BUTTON: <button...
asked by 18.01.2016 / 17:07
1
answer

Difficulty with PDO

I'm starting with the use of PDO and I have a question I could not solve. I do the select below that will return me 2 times: $sqlSaida = 'SELECT horario FROM HORARIOS WHERE COD = :codsaida UNION...
asked by 04.12.2015 / 19:02
1
answer

Error connecting to MySQL: Headers and client library minor version mismatch

When connecting to MYSQL database using the mysqli class I am getting the error: Warning: mysqli :: mysqli (): Headers and client library minor version mismatch . The error occurs when using version 5.4.16 of PHP, in version 5.6 the error no...
asked by 09.01.2017 / 19:27
1
answer

Function php does not insert records in the database [closed]

I have a php function that inserts two record types into a Mysql table, according to the user's choice in a combobox. The first option of the combo inserts the records normally, but when I choose the second one it does not insert and it does not...
asked by 03.11.2015 / 17:02
2
answers

Sum of tables according to session id

What I'm doing is summing up the number of tables according to the id of the logged-in user, so I'm making no value is proven. Bank: id id_affiliate user_ip date 1 2 162.70.25.00 2015-11-06 08:49...
asked by 11.11.2015 / 02:42
2
answers

MySQL Connection Error and Android Application

I'm having an error while trying to connect between my App and the MySQL database. I'm creating a direct connection with my bank, I know the best way would be to use a webService, but I'm making this connection in localhost and I do no...
asked by 21.11.2015 / 07:29