Hi,
it is possible to get variable into function without sending as parameter?
with mysql connection it works
function some_function(){
$result = mysql_query("SELECT * FROM table");
}
but I want to use database with Pear functions
something like:
$dbh = DB::connect($connection_data);
function some_function(){
$result = $dbh->query("SELECT * FROM table");
}
but this doesnt work because $sth has to be sent as parameter of function.
Is there any way to use Pear db queries in functions without sending connection data as parameter?
Thanks
Tomas