| Index
» Projekty
» phpMyEdit
» Fórum
» $opts options |
 |
orionis
Založený: 27.10.2008
Príspevky: 4
Zaslal: 2008-10-27 11:23
Návrat hore
Odpovedať s citátom
|
Hello,
I'm brand new on PhpMyEdit, this is my first use with it.
I don't know how to define an option that will not allow the user to update the primary key of a record, but only the description field.
I'd like only to display this primary key, without any change possible, in the change window.
In the same way, I'd like to call a single PHP source when I insert, update or delete a row in the table. How can I pick the value of the Insert/Update/Delete button I've clicked?
Thanks in advance,
Fabrice
|
cbek
Založený: 25.10.2008
Príspevky: 27
Zaslal: 2008-10-27 13:38
Návrat hore
Odpovedať s citátom
|
| orionis Napísal: |
Hello,
I'm brand new on PhpMyEdit, this is my first use with it.
I don't know how to define an option that will not allow the user to update the primary key of a record, but only the description field.
I'd like only to display this primary key, without any change possible, in the change window.
|
The answer is in this page :
http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.basic-options.html
$opts['fdd']['col_name']['input'] = 'R'; // read-only field
| orionis Napísal: |
In the same way, I'd like to call a single PHP source when I insert, update or delete a row in the table. How can I pick the value of the Insert/Update/Delete button I've clicked?
|
You should look for triggers here :
http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.triggers.html
@+
Cyril
|
orionis
Založený: 27.10.2008
Príspevky: 4
Zaslal: 2008-10-27 13:42
Návrat hore
Odpovedať s citátom
|
Many thanks Cyril!
|
orionis
Založený: 27.10.2008
Príspevky: 4
Zaslal: 2008-10-27 13:53
Návrat hore
Odpovedať s citátom
|
OK, I've read the triggers topic, it appears that I'll have to declare as many trigger files than types of actions (Insert, update, delete), and even more if I choose to perform actions before and after those actions, am I right?
As for the "input" type set to 'R', for my primary key, it doesn't solve my problem : in the insert case, I want the user to type it, but not in the update case (only the description zone can be modified).
|
orionis
Založený: 27.10.2008
Príspevky: 4
Zaslal: 2008-10-27 14:13
Návrat hore
Odpovedať s citátom
|
| orionis Napísal: |
| As for the "input" type set to 'R', for my primary key, it doesn't solve my problem : in the insert case, I want the user to type it, but not in the update case (only the description zone can be modified). |
I've found a solution for this problem :
$opts['fdd']['col_name']['options'] = 'LVAPD';
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|