Questions tagged as 'mysql'

4
answers

Return all equal items from different groups

------------------- - TABLE - ------------------- ID | GRUPO | OBJETO ---|-------|------- 1 | 1 | 1 2 | 1 | 2 | | 3 | 2 | 1 4 | 2 | 2 | | 5 | 3 | 1 6 | 3 | 2 7 | 3 | 3 | | 5...
asked by 03.09.2015 / 09:53
2
answers

How to make a JOIN between two tables from two different databases?

I have the personal data (login, password, name, etc.) of the users on a different server than I will use in a new project. I would like to know how I can cross-reference information between two tables, from databases on different servers, with...
asked by 05.02.2014 / 22:04
3
answers

Difference in use Index Unique and Unique Constraint in MySQL?

I would like to know what behavior / differences between a Unique Index and Unique Constraints for MySQL ? Many should think that this does not make a difference in the database, but it does! And not only for the DBA / Administrator, but...
asked by 21.12.2013 / 12:48
4
answers

How to check events between 2 dates in MySQL?

Knowing that I have a table called eventos , and this table has the columns id , titulo , inicio and fim . The inicio and fim columns are of type timestamp , where the start and end date and time of...
asked by 04.02.2014 / 20:30
3
answers

What are the braces {} in a SQL string?

What are the {} keys in the following SQL string used in PHP for MySQL? $sql = "INSERT INTO {$table} ({$fields}) VALUES ({$placeholders})"     
asked by 28.10.2014 / 18:23
2
answers

Collect Google Analytics data for MySQL tables

I have seen many examples of how to export data from Google Analytics to other formats, as well as keep the exported data updated, but none have so far served to export the data to MySQL because of the following problems: Exceeding query l...
asked by 08.04.2015 / 13:34
3
answers

Check if a table exists in the database

How to check if a table exists in the database before attempting to use it? <?php // define a tabela $table = 'banana'; // verificar se tabela "banana" existe aqui // $tableExists = ?? // executa consulta se existir if ($tableExists) {...
asked by 16.01.2014 / 14:11
6
answers

How to do SELECT with ORDER BY and different criteria?

How can I make a select with 2 "ORDER BY"? CATEGORY table: If I do a SELECT like this: select id,nome from CATEGORIA ORDER BY nome ASC MySQL returns the names in alphabetical order, but I need them to always return the id: 10...
asked by 20.06.2016 / 22:04
3
answers

How to create a conditional index in MySQL?

How to create a filtered index for a specific range of data? As far as I know, it is impossible to do this directly in MySQL. On some other database systems, there is usually a WHERE clause for this filter. Some systems use another name fo...
asked by 23.01.2014 / 03:58
1
answer

What's the difference between MySQL and phpMyAdmin?

What's the difference between MySQL and phpMyAdmin?     
asked by 28.02.2016 / 20:20