protect_identifiers() doesn't seem to be working - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: protect_identifiers() doesn't seem to be working (/showthread.php?tid=68438) |
protect_identifiers() doesn't seem to be working - eldan88 - 07-10-2017 Hi, I am trying to set the protect_identifiers to false for on of my queries. But it doesn't seem to be working, when I try. I have tried so many different ways and nothing seems to work. I have pasted my code below. Any help would be really appreciated! Thank you! Code: $this->db->protect_identifiers('customers', FALSE,FALSE); RE: protect_identifiers() doesn't seem to be working - InsiteFX - 07-11-2017 Please next time you post add the version of CodeIgniter that you are using. For version 3.1.5 you are calling it wrong. This function will also add a table prefix to your table, assuming you have a prefix specified in your database config file. To enable the prefixing set TRUE (boolean) via the second parameter: PHP Code: $this->db->protect_identifiers('table_name', TRUE); So if you do not need the database table prefix, just pass it the table name. |