Here's my function:
here's how i'm calling it:
Here How I constructed the dsn
however when i call it, it returns nothing. I tried using Var_dump to see what it would return and it returned "bool(false)"
Any ideas?
PHP:
function GetCell($funcConnect,$funcSQL)
{
$funcResult = $funcConnect->query($funcSQL);
return $funcResult;
}
here's how i'm calling it:
PHP:
<?php echo GetCell($UsersConnect,"SELECT age FROM cpanelname_Users WHERE PermUserID='$CurUserID'"); ?>)
Here How I constructed the dsn
PHP:
$host = 'localhost';
$port = 3306;
$UserDatabase = 'cpanelname_Users';
$LiveCompDatabase = 'cpanelname_LiveComps';
$username = 'cpanelname_Blue';
$password = '********';
// Construct the DSN
$dsnUser = "mysql:host=$host;port=$port;dbname=$UserDatabase";
// Construct the DSN
$dsnLiveComps = "mysql:host=$host;port=$port;dbname=$LiveCompDatabase";
//Create the connection to the USERS TABLE and to the LIVECOMPS TABLE
$LiveCompConnect = new PDO($dsnLiveComps, $username, $password);
$UsersConnect = new PDO($dsnUser, $username, $password);
however when i call it, it returns nothing. I tried using Var_dump to see what it would return and it returned "bool(false)"
Any ideas?
Last edited: