05-16-2008, 04:03 PM
|
#1 (permalink)
|
|
The Contributor
Join Date: Apr 2008
Location: Tampa, FL
Posts: 65
Thanks: 6
|
method madness
ok, i think i've run into a problem but, well here...
Code:
function getone($sql){
$result = $this->query($sql);
if(mysql_num_rows($result) == 0){
$value = FALSE;
}
else
{
$value = mysql_result($result, 0);
}
return $value;
}
if i use this as
Code:
$EvSql = " SELECT username FROM users WHERE username ='".$_SESSION['usr_nme']."' ";
$result = $dbCon->getone($EvSql);
print $result;
SHOULD return that username, as $result, right? or did i not write that method correct?
i get no mysql errors, no log errors, no notices with E_all on.... it returns an empty var... or i think its empty...
in that function is $value an array, after returning it at the end?
i dont think it should be, not the way i understand things, that should return that 1 cells data out of the db table....
__________________
"Knowledge is power. Abuse it."~Evulness
My portfolio: www.evularts.com
|
|
|