I would like to write a PHP module that makes use of an already
established Mysql connection.

To make things clean, I'd like the exported functions from my new module
to accept MySQL-Link resources as in:

$mysql_conn = mysql_connect( .... );

my_custom_module_func( $mysql_conn );

>From my reading of ext/mysql/php_mysql.c it looks like you need to have
access to the return code from zend_register_list_destructors_ex() in
order to be able to lookup the resource passed to you using
ZEND_FETCH_RESOURCE2().

In ext/mysql/php_mysql.c le_link and le_plink are declared static and
there's no clean way of getting at them to get the resources.

What am I missing? 

How can can I get at the MYSQL * connection set up by the mysql module
from within my module?

Any pointers to sample code or information would be greatly appreciated,

thanks,

-- Yermo 

---------------------------------------------------------------------
       Try Personal Stock Monitor for Windows(tm) for FREE at:
                 http://www.personalstockmonitor.com
           Powerful Desktop Software for Online Investors
---------------------------------------------------------------------


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to