Questions tagged as 'mysql'

1
answer

Find the first and last word of a record

I have a snippet of code that takes the first and last user name from one table and stores it in another table. For example.: Users table: Carlos Drummond de Andrade I take Carlos Andrade and store it in another table: Table selected_us...
asked by 03.07.2015 / 21:57
1
answer

SQL Query returning duplicate records

I have a BIG problem in a SELECT: I have two Tables' adwords_performance 'and' analytics_transaction 'and I need to do a SELECT by adding columns' adwords_performance.clicks ', '< strong> adwords_performance.impressions 'and' analytics...
asked by 19.03.2015 / 21:16
2
answers

Query Query 1: N

I have the following tables: Tabela: estoque id_estoque nome Tabela: atributos id_atributo id_estoque nome And for example I need to know if there are 2 attributes of name X and name Y linked to Z stock. And I wonder...
asked by 03.06.2015 / 15:41
1
answer

Notification system for multiple action and content

I'm trying to understand how best to make a notification scheme for multiple actions and nodes. Basically you should notify someone whenever a message or tan action is performed. Message: Fulano de tal enviou uma mensagem Enj...
asked by 03.06.2015 / 01:35
1
answer

Gallery with PHP and Javascript not working correctly

I have a function in JavaScript that assembles an image gallery. I had this function all in Javascript and it worked perfectly, now I need to insert PHP so that the user can make changes to the images, and I'm passing the pa...
asked by 04.06.2015 / 01:47
1
answer

CAST for monetary value stored in text in MySQL

In the product table of the database there is a valor field that has type varchar(255) Notice the query: Inquiry SELECT valor as valor_original, CAST(valor AS DECIMAL(18,2)) as valor_convertido from...
asked by 11.10.2016 / 16:08
1
answer

How to enter several data received from the same field?

I have a form in html that has a field where the user inserts the data as shown in the code below, this form is dynamic and the user can insert as much information as he wants, in the following case I put only six systems. / p> My question is:...
asked by 11.10.2016 / 01:42
1
answer

Problem with Function [closed]

Hello, I'm trying a problem with my code for query in mysql, link If the user enters some value the search in the database is done normally, but if it leaves the form blank my isset () does not work. The message that appears is:    Wa...
asked by 03.03.2015 / 15:16
1
answer

Relationship Tables

I have a Endereco table that serves both Funcionario and Vendor: 1 Funcionario possui 1 Endereco 1 Fornecedor possui 1 Endereco How do I create this relationship without having inconsistencies?     
asked by 03.03.2015 / 22:30
2
answers

MySQL - Create temporary table according to dynamic SELECT

Is there any way to create a temporary table according to a select with columns created dynamically, as shown in the examples below? ex: SELECT idCentroCusto, 'Dez/14', 'Jan/15', 'Fev/15', 'Mar/15', totalAnual or SELECT idCentroCusto,...
asked by 03.03.2015 / 14:57