Sanitizing MYSQL inputs

I’m new to database programing and Yii so forgive me if this is obvious.

What is the best way to sanitize information that is being imputed into to a database. I have already use the PHP function strip_tags() to take out any unwanted HTML or PHP tages, but how do I strip out any MYSQL calls so that a malicious or stupid user doesn’t just delete my entire database by placing a delete call for their name or something like that.


This answer suggests you should use parameter binding. I would agree, and Yii has all the features you will need. Read

Thank you vary much.