Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 29. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  display different field in notify emails

phpMyEdit Configuration     display different field in notify emails
Odoslať novú tému   Odpovedať na tému    
 
sstewart     Založený: 15.10.2007   Príspevky: 4  
Príspevok Zaslal: 2009-06-02 01:07
Návrat hore  Odpovedať s citátom     

Hi, Does anyone have any ideas on how to alter this line of code (line 2733) from phpMyEdit.class.php so I can have a different field (ie name instead of the key field) in the emails?

$body = 'Record '.$this->fdd[$this->key]['name'].' = '.$this->key_delim.$this->rec.$this->key_delim .' was updated ';

Any help or ideas are appreciated!

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2009-06-03 13:44
Návrat hore  Odpovedať s citátom     

Notification appears to me to be record based, not column based, so perhaps your (or my) interpretation of the referenced line is incorrect.

$oldvals and $newvals are available within triggers. Perhaps your goal is best achieved using $oldvals / $newvals along with writing trigger and generating an email message.

 
sstewart     Založený: 15.10.2007   Príspevky: 4  
Príspevok Zaslal: 2009-06-03 17:50
Návrat hore  Odpovedať s citátom     

Hmmm... good idea Doug. I'll look into that. This instance of phpmyEdit is single purpose so I just ended up editing the phpMyEdit.class.php file *gasp* and added the following code:

$query=mysql_query('SELECT firstname, lastname FROM '.$this->tb.' WHERE '.$this->key.' = '
.$this->key_delim.$this->rec.$this->key_delim.'');
$query_row=mysql_fetch_array($query);
$query=($query_row[0]).(' ').($query_row[1]);
$body = 'Record '.$query.' was updated on ';

It's a bit of a hack but it works.

I hope this is useful to others.

Cheers,

ss

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov