[Typo3-german] In die Datenbank schreiben
Elmar Hinz
elmar.DOT.hinz at team.MINUS.red.DOT.net
Sun Nov 20 23:38:38 CET 2005
Markus Bucher wrote:
> Guten Abend!
>
> Ich kann ganz komfortabel über $GLOBALS["TSFE"] auf die in der Datenbank
> hinterlegten Werte zugreifen.
> Was ist denn der komfortabelste Weg, diese Daten zu verändern?
> Wie kann ich neue Daten hinzufügen ?
>
> Danke.
>
Nabend Markus,
sofern Du von FE-Extensions sprichst ist der offizielle Weg IMHO
$GLOBALS['TYPO3_DB'].
http://typo3.org/documentation/document-library/doc_core_cgl/Using_the_wrapper_cl/
Komfortabel finde ich zudem einige DB-Funktione aus class tslib_cObj:
function DBgetUpdate($table, $uid, $dataArr, $fieldList, $addSlashes=0)
function DBgetInsert($table, $pid, $dataArr, $fieldList, $addSlashes=0)
Returns an INSERT sql query which automatically added "system-fields"
according to $TCA
Automatically fields for "tstamp", "crdate", "cruser_id", "fe_cruser_id"
and "fe_crgroup_id" is updated if they are configured in the "ctrl" part
of $TCA.
The "pid" field is overridden by the input $pid value if >= 0 (zero).
"uid" can never be set as a field
Elmar
--
Climate change 2005: Mexico, Guatemala, New Orleans, Sahel, Bangladesh,
Spain, Portugal, Austria, Swiss, France, ...
Production of CO2 is killing people.
Production of CO2 just for fun is killing people just for fun.
More information about the TYPO3-german
mailing list