Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Nov 13, 2018 9:01 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to delete fields into inserted two! "sql" forms
PostPosted: Fri Nov 26, 2010 10:06 am 
Offline

Joined: Thu May 27, 2010 11:37 pm
Posts: 6
I have inserted in FG_var_trunk.inc two "sql" forms, but in result I can to add elements, but can't to delete any.
Where is my mistake or this is a bug of forms constructor?

$DBHandle_max = DbConnect();
$numrow = 0;
$resmax = $DBHandle_max -> Execute("SELECT * FROM cc_trunk");
if ( $resmax )
<------>$numrow = $resmax -> RecordCount( );

if ($numrow>0) {
<------>$HD_Form -> AddEditElement (gettext("RANDOM TRUNKS")." A",
<------><------>"randomtrunksa",
<------><------>'$value',
<------><------>"SELECT",
<------><------>'size="15" multiple="multiple"',
<------><------>"",
<------><------>"",
<------><------>"sql",
<------><------>"cc_trunk_rand_a",
<------><------>"provider_name, id",
<------><------>"", "", "%1 : (%2)", "", "", "cc_trunk_rand_a:trunk_depend:cc_trunk LEFT JOIN cc_trunk_rand_a ON cc_trunk.id_trunk=cc_trunk_rand_a.trunk_depend:DISTINCT cc_trunk.trunkcode, cc_trunk.id_trunk: cc_trunk_rand_a.trunk_id = %id:trunk_id:%2 - (%1)::::%1:id='%1'");
}

$DBHandle_maxb = DbConnect();
$numrowb = 0;
$resmaxb = $DBHandle_maxb -> Execute("SELECT * FROM cc_trunk");
if ( $resmaxb )
<------>$numrowb = $resmaxb -> RecordCount( );

if ($numrowb>0) {
<------>$HD_Form -> AddEditElement (gettext("RANDOM TRUNKS")." B",
<------><------>"randomtrunksb",
<------><------>'$value',
<------><------>"SELECT",
<------><------>'size="15" multiple="multiple"',
<------><------>"",
<------><------>"",
<------><------>"sql",
<------><------>"cc_trunk_rand_b",
<------><------>"provider_name, id",
<------><------>"", "", "%1 : (%2)", "", "", "cc_trunk_rand_b:trunk_depend:cc_trunk LEFT JOIN cc_trunk_rand_b ON cc_trunk.id_trunk=cc_trunk_rand_b.trunk_depend:DISTINCT cc_trunk.trunkcode, cc_trunk.id_trunk: cc_trunk_rand_b.trunk_id = %id:trunk_id:%2 - (%1)::::%1:id='%1'");
}

Second question. How to view UNsorted added elements ?

Yours, Nixon.


Top
 Profile  
 
 Post subject: Re: How to delete fields into inserted two! "sql" forms
PostPosted: Tue Jan 18, 2011 6:40 am 
Offline

Joined: Thu May 27, 2010 11:37 pm
Posts: 6
I waited for your answer, but I didn't receive it. :(
Answer myself...
Name "trunk_depend" in second field, where ":" separated, must not be the same as in other AddEditElement.
This is a programm bug, but I can't correct it.

______
https://github.com/nixonch/a2billing Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group