Questions tagged as 'mysql'

1
answer

Import CSV files into MySQL using LOAD DATA LOCAL INFILE

I used the following script to import a .csv file into MySQL using MySQL WorkBench : USE test; LOAD DATA LOCAL INFILE 'exemplo1.csv' INTO TABLE tabela1 fields terminated by ';' lines terminated by '\r'; I've seen a number of o...
asked by 13.06.2015 / 22:13
1
answer

Displaying records in a dynamically created table

I have a MySQL table that has a MySQL query. I have a MySQL table with the following data: mysql_select_db($database_conCurriculo, $conCurriculo); $query_rsRegistro = "SELECT nome, email, celular, id_municipio, id_uf, dt_nascimento FR...
asked by 30.06.2014 / 15:23
1
answer

Equal Employee Return

I have the following code $sql = " SELECT c.*, cl.razaosocial, cl.idCliente FROM chamada as c, cliente as cl WHERE c.idCliente = cl.idClien...
asked by 10.06.2015 / 01:10
2
answers

Faster way to count how many records I have in a MYSQL table

As the title says, I wanted to know which is the fastest way to count records from a table with thousands of records.     
asked by 17.06.2015 / 15:00
1
answer

Records are duplicating when entering in the database

I am making an API and am experiencing a problem. When executing the script that calls the page via cURL, it inserts a record in the database, but instead of registering a single record, it registers 2 equal. cURL.php <?php $ch...
asked by 25.07.2014 / 19:10
1
answer

Java check, display the values registered in the MySQL database

I need help I'm doing a game in java and I need all the records and files and etc of the players in my table but I can not connect to the database much less check and display the values Ps: the Sun.java tutorial from DriverConnector did not h...
asked by 25.07.2014 / 14:13
2
answers

Database image displayed in primefaces does not appear

I'm implementing a page where I need to display a datagrid with the values of a table in the database. Each row in the table has a blob-like image. But when you try to display the image with the primefaces by the:: tag, it does not appear....
asked by 21.07.2014 / 21:14
1
answer

Number sequence

I have a database (MySQL) with 100 registered customers and I am creating a table of purchases of these clients, I know that the bank creates an autoincrement ID > I would like to put on this table only the first 20 customers who buy more prod...
asked by 16.11.2014 / 19:35
1
answer

How to total the days according to a period?

How to total the days according to a period? Example: +--------------+--------------+--------+----------+ | data_ini | data_fim | codfun | qtd_dias | +--------------+--------------+--------+----------+ | '2014-01-15' | '2014-01-31'...
asked by 24.09.2014 / 17:16
1
answer

How to calculate the average of a query result mysql? [duplicate]

How do I get the field "count (t2.id_atend) TOTAL_ATENDIMENTO "and calculate the mean of it in PHP? SELECT t3.desc_serv, t3.nm_serv, t1.nm_usu, count(t2.id_atend) TOTAL_ATENDIMENTO FROM usuarios t1 INNER JOIN historico_atendimen...
asked by 30.04.2014 / 18:07