EllisLab text mark
Advanced Search
2 of 2
2
   
CI made me laugh
Posted: 13 December 2010 08:31 PM   [ Ignore ]   [ # 16 ]   [ Rating: 0 ]
Avatar
Joined: 2009-11-10
69 posts

OS Commerce has this kind of thing all over the place:

function tep_db_num_rows($db_query{
    
return mysql_num_rows($db_query);
}

function tep_db_data_seek($db_query$row_number{
    
return mysql_data_seek($db_query$row_number);
}

function tep_db_free_result($db_query{
    
return mysql_free_result($db_query);
}

function tep_db_fetch_fields($db_query{
    
return mysql_fetch_field($db_query);

The question is: why do they write their own functions that just call native PHP functions and do nothing else special?

 Signature 

Website coming soon!

 
Posted: 13 December 2010 08:57 PM   [ Ignore ]   [ # 17 ]   [ Rating: 0 ]
Avatar
Joined: 2008-11-04
4422 posts

So you could replace mysql_some_function() by foobar_some_function(), without having to go through all your code?

 Signature 

Me: WanWizard.eu | My company: Exite | Datamapper: DataMapper ORM

 
Posted: 27 July 2012 01:33 PM   [ Ignore ]   [ # 18 ]   [ Rating: 0 ]
Joined: 2011-12-01
2 posts

LOL, what an idiot

 
2 of 2
2