| Etienne van Tonder 2005-07-27, 4:02 am |
| Is it possible to perform a delete in a loop using the same DO object, ie
foreach ($ridarray as $rid => $val)
{
if ($rid > 0)
{
if ($fDBTable->get($rid) > 0)
{
$fDBTable->delete();
}
}
}
This does not work because of the values in the object from the previous
get() as well I get an error in the find function as
$this->_query['data_select'] is not defined, ie
$sql = 'SELECT ' .
$this->_query['data_select'] . // **** error on this line ****
' FROM ' . ($quoteIdentifiers ? $DB->quoteIdentifier($this->__table) :
$this->__table) . " " .
$this->_join .
$this->_query['condition'] . ' '.
$this->_query['group_by'] . ' '.
$this->_query['having'] . ' '.
$this->_query['order_by'] . ' ';
Also, is it possible to clear all the values in an object or should I just
create a new instance?
Regards,
Etienne.
|