Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...SQL and SQL Ser...SQL and SQL Ser...SQL for Custom Search modulesSQL for Custom Search modules
Previous
 
Next
New Post
3/3/2011 4:21 PM
 
Hi all,

  I am new to SQL so this is going to be a very steep learning curve for me. I have posted in the general section about a search module I am looking for (but not much response so far). I want users to be able to search my site but I want the search entries to look at the Page Name and then Description (The sections you fill in when creating a new DNN Page).
For example if someone entered a search text of News, I want my seach to look at Page Name and find all pages where "News" in in the name, then look at Description and find all pages where "News" is in the description. Then return results in the form of:

Page name
Description



Where the Page name is the link to the page. I also want the results to be ordered where Page name takes priority. So what I am looking to fins out is what field names I need to query with SQL to find these values. I hope someone can help me.

Thanks
 
New Post
3/10/2011 6:58 AM
 
quick bump can anyone provide me with the table names for the fields: page title Page Description Thanks
 
New Post
3/10/2011 7:00 AM
 
page data is stored in Tabs table.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/10/2011 1:05 PM
 
Sebastian, thank you very much once again! I can now start to write my search module. Nothing flash but it will do what I want it to.
 
New Post
3/10/2011 9:05 PM
 
You many want to look at the SQL reporting modules like the core Reports module, or modules like SQLView Pro from DNNStuff or even my module SQLGridSelectedView,  All of these modules will accept a T-SQL Command and generate a grid as a result.

So, how you get the user value into a T-SQL command ... some of the modues will allow you to pass a parameter into the T-SQL as a substitution parameter.  For example - with SQLGridSelectedView:

Select tabname as [Page Name] from tabs where description like '%[search:text]%'

Based on a user input of "News" then the above becomes

Select tabname as [Page Name] from tabs where description like '%News%'

This will then return the tabname in a column called "Page Name" where the description contains "News"  Check out the keyword LIKE and the % wlidcard.

I would also create a link by create the appropriate HTML in the T-SQL.  so something like

Select
  tabname as [Page Name] ,
  '<a href="www.mysite.com/tabid/' + cast(tabid as varchar) + '/default.aspx">click here</a>' as Link,  
from 
   tabs
where
   description like '%[search:text]%'

So this would create a two column result of page name and link.  You could combine the two if needed.

Hope this helps.
Paul.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...SQL and SQL Ser...SQL and SQL Ser...SQL for Custom Search modulesSQL for Custom Search modules


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out