[TYPO3-project-formidable] T3CON06 Demo, delete the image.

Asbjørn Morell atmorell at gmail.com
Sat Mar 31 15:26:27 CEST 2007


Thanks Jerome.
That's was indeed the problem :) May I kindle ask you another question? The 
variable $iUid is empty when I click the lnk_delete_image link. Do you know 
how I can make it available ? (step2.xml)

Best regards.
Asbjørn morell.

  <renderlet:LINK name="lnk_delete_image" activelistable="true">
   <label>Delete image</label>
   <onclick
    runat="server"
    params="uid"
    confirm="Are you sure you want to delete this image ?"
    when="start"
   >
    <userobj>
     <php><![CDATA[

      $aParams = func_get_args();
      $iUid = $aParams[1]["uid"];

      $updateFields = array('image' => '');

      $GLOBALS["TYPO3_DB"]->exec_UPDATEquery(
       "tx_ameost3con06_car",
       "uid='" . $iUid . "'",
       $updateFields
      );

      debug($this->_oParent);


     ]]></php>
    </userobj>
   </onclick>
  </renderlet:LINK>



"Jerome Schneider" <j.schneider at ameos.com> wrote in message 
news:mailman.1.1175064162.22293.typo3-project-formidable at lists.netfielders.de...
> Hello !
>
> you should remove quotes around "$updatefields" in your call to 
> exec_UPDATEquery, I think that's the prob, because the array is passed as 
> a string in your code.
>
> Have a good day !
> jerome schneider
>
>
> Asbjoern Morell a écrit :
>> Hello.
>>
>> I am trying to create a delete button on the T3CON06 (page4) that allows 
>> me to delete the image:
>>
>>   <renderlet:LINK name="lnk_delete_image" activelistable="true">
>>    <label>Delete image</label>
>>    <onclick
>>     runat="server"
>>     params="uid"
>>     confirm="Are you sure you want to delete this image ?"
>>     when="start"
>>    >
>>     <userobj>
>>      <php><![CDATA[
>>
>>       $aParams = func_get_args();
>>       $iUid = $aParams[1]["uid"];
>>
>>       $updateFields = array('image' => '');
>>
>>       $GLOBALS["TYPO3_DB"]->exec_UPDATEquery(
>>        "tx_ameost3con06_car",
>>        "uid='" . $iUid . "'",
>>        "$updateFields"
>>       );
>>
>>      ]]></php>
>>     </userobj>
>>    </onclick>
>>   </renderlet:LINK>
>>
>> But I get a debug screen with this:
>>       caller t3lib_DB::exec_UPDATEquery
>>
>>       ERROR Query was empty
>>
>>
>>
>> Why? I checked the api and my syntex should be okay!
>>
>> Best regards.
>> Asbjørn Morell. 



More information about the TYPO3-project-formidable mailing list