SQL Token Not shown in HTML
Last Post 03-25-2010 09:54 AM by David To. 4 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Mark McQuaidUser is Offline
new to the springs
new to the springs
Posts:3
Avatar

--
03-25-2010 07:32 AM

    I have the following SQL statement:

    SELECT CustomAdHTML FROM VAN_5DD_Company WHERE CompanyID = (SELECT CompanyId FROM VAN_5DD_CompanyUser WHERE UserID = $(UserID) )

    I've tested the SQL within the Tailored Text Module and it returns the correct single row of information; however, when i use the token in the html, nothing shows up. I placed the token (which i copied from the token list to make sure i spelled it right) within a html table:


       
           
               
           
       
      $(dbCustomAdHTML)  

    What am i missing?

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    03-25-2010 08:14 AM
    HI, shouldn't the token in the HTML be $(CustomAdHTML) since that is what you are returning from the SQL select query and not $(dbCustomAdHTML)? -- David
    Mark McQuaidUser is Offline
    new to the springs
    new to the springs
    Posts:3
    Avatar

    --
    03-25-2010 09:28 AM

    Thanks for the suggestion.

    When creating the token, I used  dbCustomAdHTML as the token name. I did not use the SQL databind, but the "SQL" token key. When editing the Text/HTML content,  $(dbCustomAdHTML)  shows up to the right of the fckEditor as a valid token. However, I did try removing the "db" from the name. Now instead of nothing (blank), I get " $(CustomAdHTML) " .

    Mark McQuaidUser is Offline
    new to the springs
    new to the springs
    Posts:3
    Avatar

    --
    03-25-2010 09:38 AM

    Here is something strange. I used the sqlbind and it works. At the same time I turned on "Debug Mode". This is what was returned:

    *** Tailored Text Debug Mode Enabled ***
    Tailored Text Version:2.1.3573.20414
    DotNetNuke Version:4.9.5


    SQL Executed for Token(SELECT CustomAdHTML FROM VAN_5DD_Company WHERE CompanyId = qsCompanyId):SELECT CustomAdHTML FROM VAN_5DD_Company WHERE CompanyId = qsCompanyId
    Individual SQL Token:SELECT CustomAdHTML FROM VAN_5DD_Company WHERE CompanyId = qsCompanyId
    Individual SQL Token:SELECT CompanyName FROM VAN_5DD_Company WHERE CompanyID = 1
    SQL Initial Bind Query:SELECT CompanyName FROM VAN_5DD_Company WHERE CompanyID = 1
    Row Count:1

    *** Ending Tailored Text Debug Mode ***

    Are all these SQL Statement being executed? I only had one statement in the module, but I have other tailored text modules located on other pages.

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    03-25-2010 09:54 AM
    HI, yes the tokens get replaced only when you enable SQL binding because that's where you are retrieving the values to bind/replace. Only one SQL statement is actually being executed but it shows in debug mode several because you are performing a select sub-query and i t traces through the selection process. -- David


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi