> 
>     See details about this:
>     
>     http://bugs.php.net/?id=16495&edit=1    
> 
>     This patch implements it..but should there be some
>     parameter which triggers it?
>

Well, the problem with this is:

if (mysql_select_db("foo", $dbh)) {
    print "BAH BAM BOOM";
}

will fail either way....

-Sterling

>     --Jani
>     
> 
> -- 
> 

> Index: php_mysql.c
> ===================================================================
> RCS file: /repository/php4/ext/mysql/php_mysql.c,v
> retrieving revision 1.133
> diff -u -r1.133 php_mysql.c
> --- php_mysql.c       18 Apr 2002 16:48:03 -0000      1.133
> +++ php_mysql.c       27 Apr 2002 02:05:32 -0000
> @@ -776,6 +776,7 @@
>       zval **db, **mysql_link;
>       int id;
>       php_mysql_conn *mysql;
> +     char *prev_db;
>       
>       switch(ZEND_NUM_ARGS()) {
>               case 1:
> @@ -801,10 +802,16 @@
>       
>       convert_to_string_ex(db);
>       
> +     if (mysql->conn.db) {
> +             prev_db=estrdup(mysql->conn.db);
> +     } else {
> +             prev_db=estrdup("");
> +     }
> +     
>       if (mysql_select_db(&mysql->conn, Z_STRVAL_PP(db))!=0) {
>               RETURN_FALSE;
>       } else {
> -             RETURN_TRUE;
> +             RETURN_STRING(prev_db, 0);
>       }
>  }
>  /* }}} */

> -- 
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to