Questions tagged as 'mysql'

2
answers

How to ignore a duplicate field and proceed with the insertion?

I have a txt file that I am extracting information and in it the information is repeated 6 times, which inserts me in the database the same record also 6 times. Sete UNIQUE to a unique number for each record in the mysql databas...
asked by 23.02.2015 / 21:07
3
answers

User's way to include new pages in a site without programming

Just like in WordPress you have the option of creating, editing, displaying and editing pages I know I can use WP, but for learning I would like to do programming. I'm trying to develop a function in my panel that should have the option to...
asked by 19.09.2014 / 17:05
1
answer

Convert string to array

I get data from my database that comes in this way 1,2,3,4,5 and I need to run each number, because each number is a user ID and I want it to display each separately without a comma or anything, I tried to give foreach But I could not, ho...
asked by 21.06.2014 / 17:06
2
answers

Sum of table fields with PHP and Codeigniter

I need to add some fields to a table. I have the transaction id and I need to sum all the amount fields with the id 224, all with 222.     
asked by 23.03.2016 / 12:19
2
answers

InnoDB and MyISAM generating Table already exists error

I'm reshaping some screens of my system that entirely uses MyISAM as the MySQL Engine. In this case, these screens will use InnoDB post reformulation. Exclude, by PHPMyAdmin, all the MyISAM tables in question and hitherto perfect, there were...
asked by 06.05.2014 / 13:18
1
answer

Adding data from the same column

Is there any way to do a calculation (sum) using values from the same column? For example: the client wants to buy a quota in the amount of 2000, in the bank I have several quotas registered, among them one in the value of 1000, another in th...
asked by 07.11.2018 / 16:01
3
answers

Count how many days you have today for the bank date

I need to create a PHP application that reads the date of a column within the database in MYSQL and compares with today's date, after comparing it should print the difference of days. Example: The bank contains the following date: 2017-08-31,...
asked by 28.09.2017 / 15:45
2
answers

Optimization, quickness in select, and PHP code

Following the reasoning of this question , I did this method, where I select multiple users from once to return only 1 in random order, that is, my query that is in the function makes a sweep in the whole table to return only one result, this i...
asked by 08.12.2017 / 20:38
2
answers

Encryption with bcrypt + random salt

I have a simple question about encryption using bcrypt with salt. When in old projects I used md5, to verify in a login form if the user entered the correct password and to authenticate, it was usual to take the value that the user typed and...
asked by 26.09.2017 / 19:59
1
answer

I can not remove an item from the database

I'm trying to remove an item from the database, but it is not removing it. <form action="removelicita.php" method="post"> <input type="hidden" name="id" value="<?=$licitacao['id']?>"> <butto...
asked by 11.09.2017 / 15:29