Questions tagged as 'mysql'

1
answer

Total month to month that disappear with previous months

I need a SELECT to bring the sum of data month by month and add up with the total of the previous months. No SELECT below is bringing the sum month to month. SELECT DISTINCT MONTH(data_pgto_bx) as mes, SUM(total_bx) FROM gc_ba...
asked by 24.11.2014 / 14:00
1
answer

How to model a set of 1 to 4 default values

I'm modeling a MySQL database where key entities are documents. Among several other fields, these documents relate to one or more phases of a given project. There are 4 basic values (let's call them A, B, C and D), and the phase property...
asked by 19.11.2015 / 20:03
2
answers

Report error while performing UPDATE with SQL

I have a project, in which the administrator can change registered data of tables, but if the query is executed but no change occurs, I would like to return a message or error, here is what I have so far: $altera = "UPDATE z SET y= a WHERE x= x...
asked by 16.11.2015 / 23:20
1
answer

Problem Migrating MySQL Database to SQL Server

I am not able to migrate a database from MySQL to SQL Server, using Database Migration from MySQL Workbench. In SQL Server Server authentication, it uses login sa, I have already tried to reset the login password, but I could not. I also trie...
asked by 19.08.2015 / 06:47
1
answer

How to do ascending and descending listing in records with PHP

My table looks like this ThroughPHP,IamlistingMYSQLdatabaserecordswithinaWHILELOOP.Iwouldliketoknowhowtodothissothat,byclickingonID,or,DATA,thedatawillbedisplayedinascendingordescendingorder.SCRIPTPHP:<?php$strSQL="SELECT * FROM TABELA ORDER...
asked by 18.12.2015 / 19:26
3
answers

How to select rows from table A that are referenced in a column of table B?

I'm trying to run a query on the database to collect all rows from table A that are referenced in a column in table B: Query I'm Running -- Consulta a recolher da tabela A as linhas com ID referenciado na tabela B SELECT A.* FROM table_esho...
asked by 24.12.2013 / 20:38
2
answers

Mysql, comment types

I had already realized that mysql may not even be the only case, but I would like an explanation on it to be more objective. I have several types of comments that are accepted: 1) -- ESTA LINHA ESTA COMENTADA ? 2) # ESTA LINHA ESTA COMENTA...
asked by 16.06.2015 / 14:04
1
answer

Sorting ASC and DESC without losing variable value

I am trying to perform a sort order of records on a page by firing a List / Menu, but when I fire it, I am losing variable values from a first selection. When I enter the products page, I already place a $ dep variable and show the result. Wh...
asked by 28.01.2015 / 14:46
1
answer

How to create a page numerator?

I'm developing a "News" page with a lot of news, and it will only show 9 news stories per page, above that, you should go to page 2 and so on ... how do I do that?     
asked by 20.02.2015 / 12:46
1
answer

Display database information securely

What kind of encryption should I use to encrypt a CPF in the database and then display that same (decrypted) CPF for the client in a secure way?     
asked by 16.02.2015 / 23:16