Recently Viewed...
DNN Modules
SnowCovered Top Sellers

Live Content uses Web 2.0 approach to provide a Rich User Interface and streamlines content presentation by overlaying content on current page. Overlay images, videos, audio, text/html content, flash, dotnetnuke modules, and external content. Experience the demo...

Content Workflow + Versioning + Categorization + Multiple Display Options = Truly Advanced DotNetNuke Content Management (Requires DNN 4.5.1 or later)

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to add videos in various format and automatically convert them to flv format, you also can add videos from embed code and play them in our integrated flash video player.

'Relationship Building' and 'Communication' are two essential nuts and bolts for a business to prosper. This module allows you to bridge both of these and easily generate continuous awareness of your web site, products and services. Your prospects and customers will greatly appreciate this featur

Powerful, Ajax Enabled, Easy to Use. Document Management has never been better. Open-DocumentLibrary allows DotNetNuke users to share and manage documents in a flexible, intelligent way, offering granular control over Folder and Document access.

In this day and age, knowing as much detailed information as possible about your customer, prospect or web site user is essential. Thankfully, the new 'Dynamics Forms' module from Data Springs, makes it easier than ever to segment your data collection efforts.

Ultra Media Gallery is the most popular photo gallery and media gallery solution for DotNetNuke, UMG offers 10 different flash player to browse your gallery with completely different user interface experience.

Capture your users attention, enrich your site with multimedia flash, and create and opt in distribution list for your DNN site. These are just a few of the many features the Data Springs Module Collection can provide you.

Edit documents directly on your server. The premier document management solution for DotNetNuke (DNN). Index contents of documents. Share documents across your portal and avoid duplicates. Revised and flexible UI. Extensible architecture.

ALL NEW ! - Minimalist includes skin packs in 12 great colors. Each color has Flat, Gradient and Glass versions. Feature rich XML Flash header, perfect for just about any purpose. 9 Different menu options in each skin pack; 3 horizontal menus, 3 vertical menus and 3 all-new Twin level menus . . .

    |   Register   |   Monday, December 01, 2008   
Data Springs Product Forums...
Subject: Html returned from Sql Statement
Prev Next
You are not authorized to post a reply.

Author Messages
Sandro
Posts:1
new to the springs
new to the springs

06/21/2007 3:07 PM  

Hi, i wish to use Tailored Module in this manner:

I have a session param like http://........?idXY=1
then i wish to use idXY in a Sql Statement like this

select htmlCodeReturned from MyFunction( idXP )

where htmlCodeReturned is something like 

PictureA  PictureB  PictureC



Obviosly the picture name is based on idXY and what i wish to see is not the html code but  "PictureA PictureB PictureC"

Thanks,
Sandro De Matteis

Chad
Posts:2244
river guide
river guide

06/22/2007 11:06 AM  

Sandro,

There are a few ways to do this. First you would create a querystring token called idXY within Tailored Text. This token woudl actually be a querystring token and not a Session token but either way you would create it. Next you would create a SQL token called MySQL and use something like

Select Text from YourTable where PictureId = '$(idXY)'

You have 2 options now:
1. If the text pulls in pictureA.gif you could use something like this in your HTML (use < and > after code below, otherwise it renders it as html)
img src="http://www.yoursite.com/portals/0/$(MySQL)"

Thats assuming it only returned picture1.jpg or whatever the file was

Option 2 would be assuming that your table either pulls in the entire URL to the image OR you could always pass the parameter to a stored procedure that would then return the full URL
example:
exec sp_getmyimageurl '$(idXY)'

Then have the stored procedure return something like this
Select 'http://www.yoursite.com/portals/0' + (Select Text from YourTable where PictureId = '$(idXY)')

Something like that, not sure the exact SQL above would work but that gives you an idea. You would basically just be returning the full URL.

Finally, if you used this option your image tag would just include the SQL token and not the full URL within the token. Something like this:
img src="$(MySQL)"

That should do it!

-Chad

You are not authorized to post a reply.



ActiveForums 3.7

Copyright 2005 - 2008 by Data Springs, Inc.
Terms Of Use | Privacy Statement