Questions tagged as 'query'

1
answer

How to count the number of rows in an SQL statement?

I'm in this SQL, retrieving records (number of providers per city) from a table and would like to count how many records it has in each city . I want in front of the cities, put something like Tal (9) . I will put a print of the result of this...
asked by 24.10.2016 / 18:17
2
answers

How do I search by NAME in PHP?

I've tried it in many ways, but all of the problem in the query ... Exemplo : <form class="form-inline my-2 my-lg-0" method="post" action="home.php"> <input class="form-control mr-sm-2" type="text" name="palavra" placeholder="Pesqu...
asked by 11.09.2018 / 16:19
1
answer

How to give count to a limited value, "count up to 90 in a table that has 100"

I have set the following Query - "INFORMIX" SELECT COUNT(1) FROM (SELECT * FROM NOTA_FISCAL_NFE LIMIT 90); That returns me the following error:    An error occurred when executing the SQL command: SELECT COUNT (1) FROM   (SELECT * FROM N...
asked by 13.04.2018 / 16:29
1
answer

Date verification query

I have a normal query: select * from TABELAS Where (AlvaraNumero <> '0') and ( AlvaraValidade <> '0000-00-00' ) and ( AlvaraAnexo is NOT Null ) and ( AcidenteNumero <> '0') and ( AcidenteValidade...
asked by 23.05.2014 / 10:51
1
answer

Making quick queries [closed]

How can I make queries faster on a MySQL table with 3 million records, the table has only 4 columns, and it takes me almost 5 seconds to return data. The fields I'm searching for have index . The Query returns close to 50,000...
asked by 28.10.2016 / 11:19
1
answer

Hibernate libraries with JPA specification [closed]

I'm using JPA and Hibernate and encountering difficulties regarding querys errors. I wonder if there is a specific library for JPQL? and what are needed for projects to profile this.     
asked by 21.10.2015 / 16:27
2
answers

MySql Conversion To PDO

@$sql_usuario = "SELECT * FROM usuario "; @$qry_usuario = @mysql_query($sql_usuario ); @$linha_usuario = mysql_fetch_array($qry_usuario ); Array ([0] => 6 [u_id] => 6 [1] => 54354554 [u_cod] => 54354554 [2] => 54354554 [u_cod] => 54354554)...
asked by 29.11.2018 / 15:34
0
answers

Pass query in php to python

I'm trying to pass the php code given by api to make requests to python and I'm having some difficulties. In php the query is done as follows: $query = http_build_query(array( 'domains' => array( 'google.com',...
asked by 18.12.2018 / 15:10
1
answer

Performance query slow

I have a database that has about 3 teras and I'm having trouble optimizing some querys. In this example I have 3 tables: Assembler, Car and model. And I have this query that takes about 30m, all the inner joins are indexed and the query wa...
asked by 04.12.2018 / 23:11
1
answer

The more you want in MySQL the greater the consumption?

I am developing a website and my code is using many queries / queries in MySQL at once, I am trying to decrease these queries to the smallest number since I think the more queries the more resources will be consumed, am I right? > Example 1:...
asked by 02.03.2017 / 01:31