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  »  Show Images from a second table referred by ID

phpMyEdit General     Show Images from a second table referred by ID
Post new topic   Reply to topic    
 
coach     Joined: 21 Oct 2005   Posts: 6  
Post Posted: 2007-01-04 18:48
Back to top  Reply with quote     

Hello,

this solution works fine:
http://opensource.platon.sk/forum/projects/viewtopic.php?t=704
when the path of the image is stored in one table.

Now I would like to show the images from a second table which is referred by image_id:

Code:

$opts['fdd']['img1'] = array(
  'name'     => 'Image 1',
  'select'   => 'T',
  'maxlen'   => 64,
  'default'  => '0',
  'sort'     => true,
  'sql|LF'   => "IF(img1 = '', NULL, CONCAT('<img src=\"', img1, '\" border=\"0\" height=\"100\" width=\"100\"><br />', img1))",
  'values'   => array(
        'table' => 'images',
        'column' => 'image_id',
        'description'=> array(
               'columns' => array(
                     '0' => 'img_path'
                      ),
               ),
      )

);


The problems are

1.) it will show the ID of the images, not the path

2.) the html string is html escaped


Any idea?

Coach

 
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