• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MY_Model best library ?

[eluser]Phil Sturgeon[/eluser]
CodeIgniter forum is a great place to meet people and share.

Google is a great place to find out commonly asked questions.

If its not on Google, then feel free to share your question here and we will be happy to help. ;-)

@Jamie: Not so sure about some of your MY_Model functions. I've been re-coding some of it (just small tweaks so far) and I noticed:

public function delete_by($key, $val)
        return $this->db->where($key, $val)


public function delete_many_by($where)
        return $this->db->where($where)

I am trying to think of a better name here, as delete_by could delete many and delete_many_by() could easily only delete one record. Update and delete cannot be named by the number of results their criteria could match against, as we clearly have no idea what is in the database.

Can anyone think of a better name?

Thanks Phil! Your link was pretty funny by the way, and i recognized that for common questions it's better to aske google than to disturb hard workers! ;-)

[eluser]Mark Croxton[/eluser]
What about simply delete() and delete_where() ?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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