ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

CE image and SQL Query help

August 16, 2011 11:02am

Subscribe [4]
  • #1 / Aug 16, 2011 11:02am

    stevo_s

    176 posts

    Any help as to how to use CE image with an SQL query? it seems to return a blank.

    {exp:query sql="SELECT d.upload_date, d.file_name, c.channel_name 
    FROM exp_files d INNER JOIN exp_channels c
    WHERE c.channel_name='portfolios' ORDER BY d.upload_date DESC LIMIT 4"}
    {exp:ce_img:single src=
    {title}
    


    for some weird reason I can’t put this in the forum code but it should be :
    img src=”{exp:ce_img:single src="{file_name}” width=“120” height=“60”}

    Moved to Community Help forum by Moderator

  • #2 / Aug 16, 2011 11:50am

    Sue Crocker

    26054 posts

    Hi, stevo_s.

    Unfortunately we can’t provide direct support for third party add-ons, you’ll need to contact the developer directly. In the mean time, moving to the Community Help forum.

  • #3 / Aug 18, 2011 11:41am

    Est Digital

    62 posts

    Have you tried rel_path instead of file_name?

  • #4 / Aug 18, 2011 2:10pm

    John Henry Donovan

    12339 posts

    stevo_s,

    Use single quotes when nested within double quotes and it appears fine in the forum

    {exp:ce_img:single src=

    What appears when you add this?

    {exp:query sql="SELECT d.upload_date, d.file_name, c.channel_name 
    FROM exp_files d INNER JOIN exp_channels c
    WHERE c.channel_name='portfolios' ORDER BY d.upload_date DESC LIMIT 4"}
    <h2>{title}</h2>
    <p>{file_name}<br />
    {/exp:query}

  • #5 / Aug 18, 2011 2:22pm

    stevo_s

    176 posts

    ok thanks.

  • #6 / Aug 18, 2011 2:26pm

    John Henry Donovan

    12339 posts

    stevo_s,

    Did the query return something for {file_name}?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases