Questions tagged as 'mysql'

1
answer

Delay in Massive CodeIgniter ajax processing

My code imports data from one database to another. To avoid server overhead, I'm importing 100 out of 100 records in each ajax. I noticed that in the first requests, it takes about 40ms, but as it sends more requests, the return time grows a lot...
asked by 07.11.2016 / 15:27
2
answers

Order the highest per order

Good evening, I'm using the following command: select cliente_id, desconto, pedidos_detalhes.pedido_id, cliente_tipo from pedidos_detalhes inner join pedidos on pedidos_detalhes.pedido_id = pedidos.pedido_id; The res...
asked by 21.09.2016 / 01:30
0
answers

IF with syntax error

I'm trying to create a simple chat system using database but I want it to automatically automatically truncate when it reaches a rows limit in the database. The trigger code I made was this: BEGIN SELECT COUNT(*) INTO @a FROM sandbox_we...
asked by 15.10.2016 / 17:20
0
answers

MySQL table XML via Access

I need to first know if Access can connect to MySQL database. From this connection, I need to generate through XML an XML that contains the data of a table in my MySQL database. Later this XML should be sent to a remote server every day (via...
asked by 21.09.2016 / 20:54
0
answers

How do I make two references from one table into two tables?

Well, I have 3 tables tbl_users tbl_article tbl_profile I need tbl_usuarios to be related to tbl_artigos and tbl_profiles.  How could it be done? Tbl_users table: +-----------------+--------------+------+-----+---------+---------...
asked by 14.10.2016 / 23:37
0
answers

Trigger to update a field automatically after insert

I have a user table, basically: CREATE TABLE IF NOT EXISTS 'sistema'.'user' ( 'id_user' INT NOT NULL AUTO_INCREMENT COMMENT '', 'hashed_id' VARCHAR(40) NOT NULL COMMENT '', 'nome' VARCHAR(40) NOT NULL COMMENT '', 'cpf' VARCHAR(15) NOT...
asked by 20.09.2016 / 19:28
1
answer

List duplicate names in MySQL for change

I need to list all duplicate names in a given table and I'm not getting it, what I have so far is this: SELECT nome, foto, ativo, count(nome) FROM comColaborador GROUP BY nome HAVING count( nome ) > 1 But this script only shows me a reco...
asked by 22.09.2016 / 23:05
1
answer

How to create a dynamic Query in php

Hello, I would like your help, I am creating a form with php and mysql, in this form it has the request screen, type has the fields to be filled with month and name, in the mount has the month and year e in the name the person types the n...
asked by 18.09.2016 / 19:15
1
answer

Problems creating an event

I'm trying to create an event but I get the error below: And my query: CREATE EVENT insert_count ON SCHEDULE EVERY 50 SECOND COMMENT 'bla bla bla bla bla bla.' DO BEGIN INSERT INTO teste (nome, conectado, desconectado) SELECT parceiro...
asked by 20.10.2016 / 17:25
1
answer

Write JS to the database with $ _POST

Hello. I have a PHP script that executes an INSERT in a table in my database. The $ _POST array [txt_message] shown in the code should accept JS content, but it gets empty after the submit. It should accept for example a simple alert ('ola...
asked by 28.09.2016 / 19:28