Tag Archives: MySQL

Easy method to encode password Using PHP

We are all used to using MD5() for generating hashes when saving passwords using php and mysql. But I read some where that method is not that secure. So here is an alternative.

To encode the password before saving use,

base64_encode('password');

to decode the password after retrieving use,

base64_decode('password');


Advertisements

Quick Backup MySQL / Oracle table

This is a script I use often to get a quick back up of a database table before doing any changes to it.


CREATE TABLE BK_TBL_TEST AS SELECT * FROM TBL_TEST;

Hope this helps for those quick backups. 🙂