ADODB execute() vs. query()

Permalink
Can someone explain me what the main difference is between $db -> query() and $db -> execute()?

I tried to find the answer on the phplens.com, but did not succeed.

Thanks!

 
Mainio replied on at Permalink Reply
Mainio
They are basically synonyms in the concrete5 context.

$db->Query() is just a wrapper method for calling $db->Execute().
nklatt replied on at Permalink Reply
Per the code, found in concrete/libraries/3rdparty/adodb/adodb.inc.php, Execute will return either a RecordSet or false whereas Query wraps Execute thusly:

/**
* PEAR DB Compat - do not use internally.
*/
function Query($sql, $inputarr=false)
{
   $rs = $this->Execute($sql, $inputarr);
   if (!$rs && defined('ADODB_PEAR')) return ADODB_PEAR_Error();
   return $rs;
}