Return to Snippet

Revision: 1224
at September 26, 2006 07:42 by gdonald


Updated Code
function sqlFetchObject( $query )
{
  if( in_array( 'mysql', $GLOBALS[ 'loaded_extensions' ] ) )
  {
    return @mysql_fetch_object( $query );
  }
  elseif( in_array( 'mysqli', $GLOBALS[ 'loaded_extensions' ] ) )
  {
    return @mysqli_fetch_object( $query );
  }
}

Revision: 1223
at September 26, 2006 07:41 by gdonald


Initial Code
function sqlFetchObject( $query )
{
    if( in_array( 'mysql', $GLOBALS[ 'loaded_extensions' ] ) )
    {
	    return @mysql_fetch_object( $query );
    }
    elseif( in_array( 'mysqli', $GLOBALS[ 'loaded_extensions' ] ) )
    {
        return @mysqli_fetch_object( $query );
    }
}

Initial URL

                                

Initial Description

                                

Initial Title
php mysql/mysqli fetch object

Initial Tags
mysql, object

Initial Language
PHP