In CodeIgniter, how can I avoid sql injection? Is there any method to set in config file to avoid sql injection? I am using this code for selecting values:
You can check if you var contain only letters of numbers, meaning you var mast be in you defined format. before you insert it into the query