Forum Discussion
BobSawyer
9 years agoQrew Member
Because someone else might come along looking for this: here's the XML version:
<qdbapi>
<udata>mydata</udata>
<ticket>auth_ticket</ticket>
<apptoken>app_token</apptoken>
<rid>[record_id]</rid>
<field fid="[field_id]" filename="delete"></field>
</qdbapi>
I also added it to my copy of the PHP API wrapper as a modification of API_Edit:
public function delete_file($rid, $fid) {
if($this->xml) {
$xml_packet = new SimpleXMLElement('<qdbapi></qdbapi>');
$xml_packet->addChild('rid',$rid);
$xml_packet->addChild('field','');
$xml_packet->field[0]->addAttribute('fid',$fid);
$xml_packet->field[0]->addAttribute('filename','delete');
if ($this->app_token)
$xml_packet->addChild('apptoken', $this->app_token);
$xml_packet->addChild('ticket',$this->ticket);
$xml_packet = $xml_packet->asXML();
$response = $this->transmit($xml_packet, 'API_EditRecord');
}
if($response) {
return $response;
}
return false;
}
<qdbapi>
<udata>mydata</udata>
<ticket>auth_ticket</ticket>
<apptoken>app_token</apptoken>
<rid>[record_id]</rid>
<field fid="[field_id]" filename="delete"></field>
</qdbapi>
I also added it to my copy of the PHP API wrapper as a modification of API_Edit:
public function delete_file($rid, $fid) {
if($this->xml) {
$xml_packet = new SimpleXMLElement('<qdbapi></qdbapi>');
$xml_packet->addChild('rid',$rid);
$xml_packet->addChild('field','');
$xml_packet->field[0]->addAttribute('fid',$fid);
$xml_packet->field[0]->addAttribute('filename','delete');
if ($this->app_token)
$xml_packet->addChild('apptoken', $this->app_token);
$xml_packet->addChild('ticket',$this->ticket);
$xml_packet = $xml_packet->asXML();
$response = $this->transmit($xml_packet, 'API_EditRecord');
}
if($response) {
return $response;
}
return false;
}
RyanAnderson2
6 years agoQrew Cadet
did the same thing the other day. join the bandwagon! haha.