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!
I tried to find the answer on the phplens.com, but did not succeed.
Thanks!
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; }
$db->Query() is just a wrapper method for calling $db->Execute().