|
Posted by nephish on 08/17/06 02:56
hey there,
ok, i am starting with building my Customer custom php class.
now, one funciton that i want to write will populate the class
variables with values from the database. i have a function that makes
my connection for me. This is so i dont have the connection code in the
web_root folder .
so in most of my php pages i have something like
require('/var/common_php/db_connect.php');
then have $conn = make_db_connection();
ok, so now i have this class, the class is going to be the only class
of the php file that will be saved as the same name. Class Customer in
Customer.php. So, where do i put my connection function ?
inside the class? or just in the same file? or in the php page that
calls the class ?
what would be best ?
thanks
[Back to original message]
|