September 07, 2010, 09:58:33 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Common questions answered here !
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: "ff_query" is more secure?  (Read 528 times)
greenreptile
Jr. Member
**
Offline Offline

Posts: 68


hello


WWW
« on: August 17, 2008, 07:05:17 pm »

i have a question about this function : "ff_query"

for insert statements, we can use one of two ways to pass it to db:

1) using ff_query($sql)
2) joomla database functions :

     $database->setQuery ($sql);
     $database->query();


which one is more secure? why?
Logged

life4life
Bitsqueezer
Living Legend
******
Offline Offline

Posts: 1872



« Reply #1 on: August 17, 2008, 10:13:37 pm »

Hi,

this is the contents of the ff_query function:

Code:
function ff_query($sql, $insert=false, $error=FF_DIE)
{
    global $database, $ff_processor;
    if ($ff_processor->dying && $error!=FF_IGNOREDIE) return -1;
    $database->setQuery($sql);
    $database->query();
    if ($database->getErrorNum()) {
        $dienow = $error==FF_DIE;
        $error = $database->stderr();
        if ($dienow) ff_die($error);
    } else {
        $error = null;
        if ($insert) return $database->insertid();
    } // if
    return 0;
} // ff_query

As you can see, it doesn't make more, only tests some more things before.

Cheers,

Christian
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by SMF © 2001-2006 Lewis Media
| Terms of Use | Privacy | Sitemap |