Posted By

gdonald on 09/26/06


Tagged

fetch mysql object myqli


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

vali29
ki4ngel


php mysql/mysqli fetch object


 / Published in: PHP
 

  1. function sqlFetchObject( $query )
  2. {
  3. if( in_array( 'mysql', $GLOBALS[ 'loaded_extensions' ] ) )
  4. {
  5. return @mysql_fetch_object( $query );
  6. }
  7. elseif( in_array( 'mysqli', $GLOBALS[ 'loaded_extensions' ] ) )
  8. {
  9. return @mysqli_fetch_object( $query );
  10. }
  11. }

Report this snippet  

You need to login to post a comment.