[TYPO3-formidable] Database insert / update
Domi Garms
djgarms at gmail.com
Wed Aug 4 10:04:48 CEST 2010
Hello List,
Im on my first steps for using formidable for an extension and I dont
find an example for inserting-updating a new dataset over several
tables without using LISTER. Im working with several tables,
mm-relations and dont know how to continue. I just tried my first
steps with following code (only one table), but Im sure that I made
some things totally wrong between the datahandler and the elements.
How can I make a custom sql query with a WHERE param for getting the
right dataset? How do I deal with n:m relation datasets?
Can somebody help me out and can give me some hints?
<control>
<datahandler:DB>
<tablename>tx_myfirst_test</tablename>
<keyname>uid</keyname>
<process>
<beforeCreation>
<userobj>
<php><![CDATA[
//creation
$aData = $this->getParams();
$aData["pid"] = 111;
$aData["crdate"] = time();
$aData["tstamp"] = time();
$aData["reason_aupair_description"] =
$_POST["new_aupair['reason_aupair_description']"];
$aData["reason_aupair_description"] =
$_POST["new_aupair['reason_aupair_description']"];
return $aData;
]]></php>
</userobj>
</beforeCreation>
</process>
</datahandler:DB>
<renderer:STANDARD/>
</control>
<elements>
<renderlet:TEXTAREA name="self_description" label="Please describe
yourself:" />
<renderlet:TEXTAREA name="reason_aupair_description" label="Please
let families know, why you want to become their aupair:" />
<renderlet:SUBMIT name="save" label="Save" />
</elements>
Thanks a lot
Domi
More information about the TYPO3-project-formidable
mailing list