Questions tagged as 'mysql'

1
answer

How to use SCOPE_IDENTITY in sqlite

I have a mobile application that inserts a database in the DB and needs to return the ID of this register, but I do not know how to use it and I do not know if SCOPE_IDENTITY works in sqlite, my code looks like this: var idSolicitacao = tx.exe...
asked by 08.06.2015 / 15:03
1
answer

Modifying Values of Multiple Lines

I need a query that modifies multiple values at the same time The idea is more or less this "INSERT INTO registros(Envio) VALUES('1') where Aviso = '" + DdataAtual.Year + "-" + DdataAtual.Month + "-" + DdataAtual.Day + "' " The que...
asked by 09.06.2015 / 17:07
1
answer

Return tags associated with posts

I use the query below to return all posts tagged with the tag defined: SELECT imprensa_posts.slug AS slug, tipo, titulo, data FROM imprensa_posts JOIN imprensa_tags_posts ON imprensa_tags_posts.id_post = imprensa_posts.id_post JOIN imprensa_...
asked by 10.06.2015 / 20:55
1
answer

SQL: Can I have clauses in GroupBy that do not appear in Select?

I know that I can not have clauses in the select that do not appear in Group By. But is it possible otherwise? For example: Select B From Table Group By A,B     
asked by 10.05.2015 / 03:36
1
answer

The Bitsnoop API is catching WHILE

Hello, I'm using this Bitsnoop API , but a part of it is "locking" WHILE. WHILE only runs once and nothing below it loads. Code: if($sql = mysqli_query($coneccao, "SELECT * FROM arquivos_downloads WHERE nome LIKE '%$palavra_chave%' ORDER B...
asked by 12.05.2015 / 23:30
1
answer

How to integrate a MySQL database with a C # application?

I am a beginner in database and I have a simple C # application of registers and I want to use the MySQL database to store the data. I have MySQL Server installed and I usually use the "command-line client" where I already have a test table c...
asked by 02.04.2015 / 17:49
1
answer

List tables by foreign key in MySQL

How to identify tables that relate to one another, that is, tables that have a foreign key that references another table? As the dummy example, I need a statement that shows the list of tables linked to the product table as output, in this...
asked by 21.03.2015 / 02:33
1
answer

LEFT JOIN mysql Filter non-existent records NOT IN

Good afternoon, what I'm trying to do is this: I have two tables machines - stores the copier location data (address, zip, etc.). readings - stores the machine code, counters, date, etc. I wanted to display all records from the M...
asked by 25.03.2015 / 20:12
1
answer

POO PHP function insert into MYSQL [closed]

Hello, I want to make a function to insert the data into the table, it is not returning anything, just look at the code: function insertInto ($tabela, $colunas=array(), $valores=array()) { foreach ( $valores as $valor ){...
asked by 23.03.2015 / 13:49
1
answer

Look for interlaced ID (which is mutual), sql mysql

I have a table of this format RELATIONS ----------------- ID | ID_1 | ID_2 All in INT and ID is auto incremental. It is filled in this way: ID | ID_1 | ID_2 ----------------- 1 | 1 | 5 ----------------- 2 | 5 | 1 --...
asked by 02.07.2015 / 19:10