Fellow PHP list members,
I'm hoping you can share your knowledge and help me. I'm incorping the
PEAR:DB module into my scripts and I'm running into a situation. To
make a long story short.. I basically have 2 files. Index.php and an
include file I'm calling db_functions.php which I'm creating myself. **
NOTE: watch for wrapping **
In the index.php file I have the following code:
require_once('include/db_connect.php');
require_once('include/db_functions.php');
/* includes commonly used functions */
require_once('common.php');
$sphist_rec_count =
GetRecCount('RecentActiveSpaces','RECENT_SPACE_COUNT');
In my db_functions.php, I have the function called GetRecCount(). It
basically retrieves the
Record count from a mySQL table. For some reason, the "db_object" object
doesn't get created unless
I include the db_connect.php inside the GetRecCount function. Something
tells me that this is not proper
Coding, and I was wondering if someone could tell me if there is another
way to do this?
Thanks,
Jim
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php