phpgroupware-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-users] Autocreation of account, some problem. Seems so


From: Chris Weiss
Subject: Re: [Phpgroupware-users] Autocreation of account, some problem. Seems solved. ;)
Date: Wed, 30 Oct 2002 14:25:39 +0000

>I've looked at that file, that line, and tried:
>
>       $this->db->query("SELECT account_type FROM phpgw_accounts WHERE
>               account_id='".$account_id."'",__LINE__,__FILE__);
>        //$this->db->query("SELECT account_type FROM
>               phpgw_accounts WHERE 
> account_id=".$account_id,__LINE__,__FILE__);
>
>and works. ;-)

account_id is an int, why would it need quoted in the SQL?  The real problem is
that $account_id is empty and not numeric.  So the real fix should be something
more like:

        if (!is_numeric($account_id))
        {
                $account_id = 0;
        }
        $this->db->query("SELECT account_type FROM
                phpgw_accounts WHERE 
account_id=".$account_id,__LINE__,__FILE__);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]