• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
protect_identifiers() doesn't seem to be working

#1
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);
          $this->db->update_batch("customers",$totals_array,"customers_id");
Reply

#2
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.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.