Questions tagged as 'mysql'

1
answer

MySQL: Pivot (rows for columns) of columns with the result of a query dynamically

I have two sets of tables below: 1: 2: IputaquerythatreturnstheresultsofthetwotablesusingUnion:Selecttbprojeto.projNomeAsProjeto,tbindp.indPNomeAs'Tipo(Ind/Idx)',tbindc.indcValorAsValor,tbproj_cenario.projCenNomeAsCenário,tbidxind_grp.i...
asked by 15.10.2015 / 03:36
2
answers

Message to user after header change

I have a small problem with PHP, I need to redirect the user, but I wanted to notify you of what happened, I redirect it with header() , but if I try to send something before header fails, Any tips on how I can send a message to...
asked by 03.12.2015 / 05:01
1
answer

Insert new columns with ID's decoding into existing table

I have a table named products, this table already has the necessary fields for its use, but now I need to include 4 more columns in it, columns that will be the description of some ID's that I have , the table structure currently looks like this...
asked by 07.10.2015 / 15:09
2
answers

How to count the time the user takes on the page?

I'm doing a PHP, JavaScript, and MySQL question and answer program. Well, in that code I need to count the time it takes the user to answer the question and store it in a variable to use the value in another code. Also, is there any way to...
asked by 03.12.2015 / 00:19
3
answers

how to use the date interval to count days?

How can I use date interval to count when to register a product, for example I register the product day 8 I want that from 15 days this product is no longer a new product, or when it is 23 this product is no longer how can I do this using...
asked by 09.10.2015 / 19:24
1
answer

Relationship table query N: N

How do I display all projects that have a specific advisor? The relationship between Advisor and Project is N:N , so it contains the Projeto_has_Orientador table as the relationship table. Tables: CREATE TABLE IF NOT EXISTS...
asked by 10.10.2015 / 05:41
2
answers

SELECT sort by quantity of another SELECT

I have two tables in MYSQL: account: id apelido_usuario 1 caio 2 manoel 3 josé product idconta status 1 3 1 3 1 1 2 3 3 2 I made a SELECT like this: SELECT * FROM conta WHERE apelido_usuar...
asked by 21.09.2015 / 20:00
1
answer

How to generate a record for each new relationship between two entities

Considering a scenario where a member has a account , personal profile , academic profile status (between pre-defined statuses: teacher, student and collaborator) within the system. For each status , the academic profile is different....
asked by 17.09.2015 / 13:49
1
answer

How to maintain ordered list of records in relationship N: N

Considering a scenario where a author can hold multiple posts and a post can have several authors an intermediate table to maintain relationships. However, the order of the authors in a publication is chosen by the client at the t...
asked by 15.09.2015 / 16:33
1
answer

MYSQL - FK ERROR

Hi, could you help me? I am trying to add the FK in the table officials, only it is giving this error OBS I am creating the other tables before the officials 20:29:15 CREATE TABLE Funcionarios( id INT(5) NOT NULL AUTO_INCREMENT, nomeComplet...
asked by 13.09.2015 / 01:03