• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Posting from CSV to DB but CSV titles have spaces in them, cannot escape?

#1
[eluser]Beertastic[/eluser]
Here's an array I'm generating using the first line of a file to create the array keys.
my DB is set up with identical names:

Code:
Array ( [Video Title] => ShowName123 [TV Series] => Show [Season] => 1 [Episode] => 1 }

However, when I use $this->db->insert() to put it into my DB... it created this SQL:

Code:
INSERT INTO `my_table` (`Video` Title, `TV` Series, `Season`, `Episode`) VALUES ('ShowName123', 'Show', '1', '1')

I know that adding 'false' to other functions in active record can escape characters, but how do we escape characters in array KEYS? The spaces in those names are killing me.. and no, I can't change the feed... Sad


Messages In This Thread
Posting from CSV to DB but CSV titles have spaces in them, cannot escape? - by El Forum - 07-04-2012, 07:49 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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