allright so I searched and I saw a lot of people have this problem however I ddi not see my issue so hear goes
I am using ADODB (Still trying to get PEAR to install and might work with PEAR DB but that's another story)
I declare the all the necc stuff in an include file
$db = ADONewConnection($db_driver); # eg 'mysql' or 'postgres'
$db->debug = true;
$db->Connect($host, $user, $pass, $db_name);
The from within that same include file I have a fucntion that uses that info
function get_user_name($userSes) {
$userSql = "SELECT user_first FROM phpbb_users WHERE user_id = '$userSes'";
$useUserSql = $db->Execute($userSql);
if ($useUserSql)
{
while ($outUserName = $useUserSql->FetchRow()) {
$returnUserName = $outUserName[0];
}
}
return $returnUserName;
}
well It doesn't like
$useUserSql = $db->Execute($userSql);
So I move that out of the function and although the fucntion is broke and it doesn't return the correct output it will fully pase the page and ADODB just says the query is empty which is expected.
Why can I not use that line in the function?