Konstantin Osipov writes:
> Hi All!
>
> Is this code buggy?
> --
> MYSQL* mysql = new MYSQL;
>
> mysql_init(mysql);
>
> mysql_real_connect(mysql, "localhost");
> /* some work*/
> mysql_close(mysql);
> mysql_real_connect(mysql, "otherhost");
> /* some work*/
> mysql_close(mysql);
>
> delete mysql;
> --
> In other words, if struct MYSQL allocated manually, should i call
> mysql_init(mysql) after mysql_close(mysql) if i want to connect using this
> struct to other database?
>
>
> WBW, Konstantin
>
Yes, the above code is very buggy.
Delete your first and last line and check the result from the
subsequent functions !!!
Regards,
Sinisa
____ __ _____ _____ ___ == MySQL AB
/*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED]
/*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus
/*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____
^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
/*/ \*\ Developers Team
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php