Truncating data manually or letting MySQL auto truncate?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
exesteam
Forum Newbie
Posts: 5
Joined: Mon Jan 19, 2009 6:27 pm

Truncating data manually or letting MySQL auto truncate?

Post by exesteam »

Hello there

I read Stefan Esser's ebook and it told me to use STRICT_ALL_TABLES for MySQL which makes it to not truncate data passed into database. Now I wonder if it's good to truncate on PHP because PHP is slower than MySQL in truncation. Also, I do not see problems in MySQL's auto truncation IF we handle truncation attacks properly. Agree?
Post Reply