View Single Post
Old 09-07-2010, 01:07 PM   PM User | #1
FIA2008
New to the CF scene

 
Join Date: Jun 2009
Location: Utrecht, Holland
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
FIA2008 is an unknown quantity at this point
mysql_query makes variable disappear

I have the following code:
PHP Code:
class database{
    function 
config($part){
        
$sql    mysql_query("SELECT ".$part." FROM configuration");
        if(
$sql){
            echo 
'ok';
        }
        else{
            echo 
'no sql';
        }
    }

This doens't work for some reason...
As soon as I remove the command mysql_query(); it says that $sql exists...
Does anyone has a solution for this problem?
FIA2008 is offline   Reply With Quote