This topic is locked

Table Update with custom code

11/28/2008 5:41:56 AM
PHPRunner General questions
T
taumic author

Hallo,
I have build a buttom on the _list page with the visual editor in HTML view.
[codebox]<INPUT class=button title="Test" onclick="window.location.href='cobsconfig_list.php?editid1={$show_key1}&amp;mt_del=yes';" type=button value="Test">[/codebox]
Then in table events / List Page / Before process I put the following custom code
[codebox]if ($_REQUEST["mt_del"]=="yes")

{

global $conn;

$strDel ="delete from cobsconfig where mandant = 'NEU'" ;

db_exec($strDel,$conn);

}
[/codebox]
It works fine - I am enthused.
But now I want to flexible the delete command. When I click the button,

at first I want to ask for the mandant, put the mandant in a variable and then use the variable to delete the according mandant.

Can you help me or can you write me a example?

Thanks a lot!
Michael

J
Jane 11/28/2008

Hi,
unfortunately there is no easy way to do this task. It requires a lot of custom JavaScript coding.

I recommend to use simple Delete function for that.