hi....
i have this function inside a class that im writing that eventually i want
to put inside a package of my own... the function goes like this: (comment
block included):

/**
*function Connect: open connection to database.
*
[EMAIL PROTECTED] string $host mysql hostname to connect to
[EMAIL PROTECTED] string $mysqluser name of the mysql user to login with
[EMAIL PROTECTED] string $mysqlpwd the users password for mysql server
[EMAIL PROTECTED] resource|false
*/

function Connect($host, $mysqluser, $mysqlpwd){
$link=mysql_connect($host, $mysqluser, $mysqlpwd)
if(!$link){ return false; }
else { return $link; }}
should i keep it like this or is it better for the function itself to deal
with error handling at the same time? i.e. should it return an error
message/number or something of that sort or give the returned resource over
to some other function that deals with errors....

it works just fine the way it is just trying to come up with some ideas that
would add more functionality to it if possible...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to