Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  URL link in different field

phpMyEdit General     URL link in different field
Post new topic   Reply to topic    
 
myksa     Joined: 16 Oct 2007   Posts: 14  
Post Posted: 2008-02-22 15:43
Back to top  Reply with quote     

Hello

Is there a way to show URL link in different field? For example:

- ID
- URL

I want to show only ID field which would be a link with specyfied URL:

<a href="URL">ID</a>

Of course, if there isn't any url, only ID would be shown.


Last edited by myksa on 2008-03-04 10:06, edited 2 times in total

 
myksa     Joined: 16 Oct 2007   Posts: 14  
Post Posted: 2008-02-28 08:31
Back to top  Reply with quote     

Hello

Your advice was good - search for concat.
So I found and after writing these two lines everything works now:
Code:

  'escape'   => false,
  'sql|LF'   => 'if(view = "yes", CONCAT("<a href=\"asdf.php?id=", id, "\">", id, "</a>"), id)'

So now I have linked ID when view field is set to yes, and only text otherwise.

Thanks for help!

 
myksa     Joined: 16 Oct 2007   Posts: 14  
Post Posted: 2008-03-04 09:47
Back to top  Reply with quote     

Unfortunately that's not a perfect solution, because I'm linking my primary key column. When I'm trying to change/view/delete/copy record, nothing displays, because in change/view/delete/copy URL uses value with URL (record isn't found).

Is there a way to fix this?

 
michal     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2008-03-12 11:04
Back to top  Reply with quote     

if you want to use the primary value, it is possible to use $key

http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.url-linking.html

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy