Questions tagged as 'mysql'

3
answers

Inserting current date in php

I'm trying to insert the current date as the person registers but did not want the user to report this data but rather to insert it through some function with mysql to record the date the vendor was registered. But I tried in some ways and I cou...
asked by 19.10.2017 / 18:43
1
answer

How to make a rollback button or "undo" in my application?

Is there any way to recover the deleted data from the Database? I am making an application where I have the buttons to add, edit and delete and now I am thinking of doing another one to undo a delete. How can I do this? I believe there are sever...
asked by 11.02.2017 / 20:40
3
answers

Handling foreign key errors in Codeigniter

I'm implementing a code where you have a foreign key in two tables. I have already tried different media and can not handle the error: Error Number: 1451 Cannot delete or update a parent row: a foreign key constraint fails ('base'.'tableus',...
asked by 09.02.2017 / 22:32
2
answers

Select with JOIN

How do I limit this query to list only one image record? I have the property table and the photo table, the property table has several records, and each record has several photos, but when I run select, it takes into consideration the amount...
asked by 27.01.2017 / 14:49
2
answers

How to make a Login and Password system securely for Mobile Applications? [closed]

I created a security system in php with mysql for my website, but by the browser on desktop computers, the session is stored in cookies, and it is easy to know which user is logged in and what are their limitations in each query, since I will ha...
asked by 11.09.2017 / 16:45
1
answer

Add final total value using group by MySql?

I have the Sales table and the seller table and would like to know the sales percentage of each salesperson.    table seller Id | Vendedor | 1 | Fulano | 2 | Beltrano |    table request Id | Id_Vendedor | Valor | Desco...
asked by 04.06.2018 / 20:54
2
answers

How to select the most used foreign key?

I would like to make a SELECT where you would select the foreign key ( idTema ) most used Example: That example above would be 1 How would that SELECT ?     
asked by 14.06.2018 / 22:20
2
answers

Include numbers to complete number sequence in PHP [duplicate]

In this case I have the result in MYSQL. 01 03 06 09 I need to fill in the correct sequence number up to the 12th digit. Example: 01 02 03 04 05 06 07 08 09 10 11 12     
asked by 03.04.2018 / 15:37
1
answer

how do I pull the result of a column inside a string in mysql

example: select case when campo = 1 then 'existe o resultado='aqui eu colocaria o nome da coluna da tabela 'fim da string' else 0 end from banco.tabela; How would you do that have a way of concatenating?     
asked by 11.04.2018 / 14:42
2
answers

How to make logic enable text field at a time when filled

How should I proceed with logic? There is a data record form on the page, namely: Name Surname Age Mobile I need to leave these fields as follows: 1- When the page loads the Last name , Age and Cell phone fields should be...
asked by 20.04.2018 / 01:02