Questions tagged as 'mysql'

3
answers

Selecting fields that are repeated in the MySql database

I have a table in the database, with columns id , assunto , mensagem , id_replicante I want to select all the records in this table. However, in the field assunto it has several values that repeat, and I wou...
asked by 18.09.2014 / 22:04
2
answers

How to make this SQL request with this particularity?

In this search when the array returns 4 as shown in the SQL below, I need the system to return all results whose number of rooms and >= 4 . You can help me get this result. I converted the column to INT . It was ugly the...
asked by 07.10.2014 / 20:36
2
answers

Google Maps with file_get_contents error. What can it be?

I am implementing Google Maps on a real estate website and I have a problem to solve: the request gives% error of% ... Soon in the middle of the code is the result of the variable file_get_contents($url) which if I copy and paste it in...
asked by 30.09.2014 / 18:15
1
answer

NodeJs return function - Mysql query

I am not able to return value in the function, I know it is wrong, but I have tried several times without success. The query is being performed and brings the password, the problem is to return this value to whoever ran the function: function...
asked by 11.11.2018 / 18:02
1
answer

MySql query - How to select products that were returned before being purchased using sql only

I have the following table of a mysql product movement database that contains the following fields: id | prod_id | prod_name | movimento_tipo | data_transaction 1 | idProd1 | tv | ordemCompra | 1-jan-2018 2 | idProd1 | tv |...
asked by 22.11.2018 / 16:52
2
answers

How to use multiple select in PHP form to query in MYSQL

I have a search with a select that can select more than one option, but I do not know how to do it so they search for all the selected options. Currently it does the search, it inserts the values in the url (I'm using GET ), but it can...
asked by 03.08.2018 / 14:51
1
answer

Export DB table in csv format with columns separated by semicolons

I can already export in CSV , but the columns are coming separated by vírgula , how to make them separated by ponto e vírgula ?    My code: <?php //export.php if(isset($_POST["export"])) { $connec...
asked by 11.08.2018 / 17:56
2
answers

How to read comments from MySQL table fields?

This command    SHOW COLUMNS FROM [table name]; Show the fields of a table and the most important details of them I need to read the field comments, eg:    COLUMN cod_id INT (10) UNSIGNED NOT NULL COMMENT 'CODE   CLIENT '...
asked by 09.08.2018 / 15:42
2
answers

Select with two conditions

How do I select users who have code other than 0 and 573? For example, this is my table: Usuario Codigo 1 573 2 0 3 0 4 100 5 520 I need to select only users who have DIFFERENT code...
asked by 27.12.2018 / 12:28
1
answer

MySQL table with performance problem (Very slow)

I have a MYSQL table with only 31,000 records and it is very slow when I am going to query, but I have no idea how to resolve this. Your creation script is this: CREATE TABLE 'PHOTOS_Data_Base' ( 'PHOTOS_Data_Base_ID' int(11) NOT NULL AU...
asked by 28.06.2018 / 16:28