Welcome Guest, Not a member yet? Register   Sign In
My Questions
#11

[eluser]php_princess[/eluser]
Oooh, I got it to work. I changed the one_of_these check to this:

Code:
public function one_of_these($currentField, $acceptable)
{  
  if ( ! is_array($acceptable)) $acceptable = explode(',', $acceptable);
  
      return ( ! in_array($currentField, $acceptable)) ? FALSE : TRUE;
}

I dunno what I was thinking when I first wrote this. I haven't slept good the last couple days, I blame that, lol.
#12

[eluser]php_princess[/eluser]
I heard its more efficient to store IP addresses, in a database, as an integer. It seems that you use INET_ATOM(), during the insertion query, to change it into an integer, and INET_NTOA() during the select query to change it back.

Question is, how do I do this with CodeIgniter's Active Record methods?




Theme © iAndrew 2016 - Forum software by © MyBB