19 require_once(BASE.
"wcmf/lib/util/class.Message.php");
20 require_once(BASE.
"wcmf/lib/util/class.StringUtil.php");
21 require_once(BASE.
"wcmf/lib/model/class.Table.php");
22 require_once(BASE.
"wcmf/lib/model/mapper/class.TableRDBMapper.php");
42 function getSelectSQL($condStr, $orderStr=null, $attribs=null, $asArray=
false)
51 foreach($tableDef[
'_datadef'] as $curDef)
52 if ($attribs == null || in_array($curDef[
'name'], $attribs))
53 $attribStr .= $type.
".".$curDef[
'name'].
", ";
56 if (strlen($condStr) == 0)
59 $completeOrderStr = $orderStr;
60 if (strlen($orderStr) > 0)
61 $completeOrderStr =
" ORDER BY ".$orderStr;
65 'attributeStr' => $attribStr,
66 'tableStr' => $this->_dbPrefix.$tableStr,
67 'conditionStr' => $condStr,
68 'orderStr' => $orderStr
71 return "SELECT ".$attribStr.
" FROM ".$this->_dbPrefix.$tableStr.
" WHERE ".$condStr.$completeOrderStr.
";";
90 $rows = $object->getRows();
91 for($i=0; $i<
sizeof($rows); $i++)
94 foreach($object->getRow($rows[$i]) as $value)
95 $valueStr .= $this->_conn->qstr($value).
", ";
107 return array(
"DELETE FROM ".$this->_dbPrefix.$this->getType());
117 if ($oidParts[
'type'] != $this->
getType())
removeTrailingComma($string)
TableRDBMapper maps Table objects to a relational database schema where one object contains several t...
getSelectSQL($condStr, $orderStr=null, $attribs=null, $asArray=false)
TableRDBMapper maps Table objects to a relational database schema where one object contains several t...
decomposeOID($oid, $validate=true)