I would like to port some Mysql code I have over to a PHP module. 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 doesn't seem to be a 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? I want to be able to do queries on an already opened connection? 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 ---------------------------------------------------------------------