User Profile

Collapse

Profile Sidebar

Collapse
grabit
grabit
Last Activity: May 28 '09, 10:05 PM
Joined: Mar 10 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • grabit
    started a topic Sort (SQL) Query Results

    Sort (SQL) Query Results

    Hi People
    I have a query with the following sql statement:
    Code:
    <cfquery name="showcategories" datasource="#dsn#">  
    SELECT fcategories.catID, region, category, description, 
    MAX(postdate) AS lastpost, COUNT(threadID) as postCount 
    FROM fcategories LEFT JOIN fthreads 
    ON fcategories.catID = fthreads.catID 
    GROUP BY fcategories.catID, region, category, description 
    ORDER
    ...
    See more | Go to post
    Last edited by NeoPa; Jan 7 '09, 03:13 PM. Reason: Please use the [CODE] tags provided

  • grabit
    replied to problems with datepart in access
    Thanks heaps Nic i had to make a few changes for the coldfusion type code but this works perfectly.
    WHERE Year(datelisted ) = #form.listedyea r# and Month(dateliste d) = #form.listedmon th#
    Thanks very much...
    See more | Go to post

    Leave a comment:


  • grabit
    started a topic problems with datepart in access

    problems with datepart in access

    Hi Peoples
    I am having probs with the datepart function with a query.What i want is to get all listings made in any month in any year ie May 2007
    i have 2 drop down boxes to select the listedmonth and listedyear on the refering page
    I need to be able to retrieve this so i can send out renewals to those listings for another year.
    I am using this query
    <cfquery name="getrenew" datasource="#ds n#">...
    See more | Go to post

  • the only error msg i get is that there is a syntax error
    and yes im using dreamweaver
    See more | Go to post

    Leave a comment:


  • sql search and syntax errors in coldfusion search page

    Hi Peoples

    I am using sql to search for whole words in a string "listtext". on the search form my field is named "search" (without the ""'s)
    to search for a whole word with a > in front of it I am using
    [CODE=cfm]OR listtext LIKE '%>#form.subjec t#%' [/CODE]
    this works all ok it seems.

    HOWEVER
    when i try and serach for a trailing < straight after the word like...
    See more | Go to post

  • grabit
    started a topic sql search problem

    sql search problem

    Hi Folks
    I have the following code in my search results page, however it isreturning results of partial words ie search for "hock" and it returns "hocking", search for "test" and it returns "attested" can someone pls help with how i can overcome this please.
    It also appears that it is not finding a result if the search criteria is either the first or last word in a sentance.

    code...
    See more | Go to post
    Last edited by NeoPa; Oct 4 '07, 07:48 PM. Reason: Please use [CODE] tags

  • grabit
    started a topic problem sql query

    problem sql query

    Hi Mary
    this is the problem child (query)
    <!---Query db for page info--->
    <cfquery name="showtopic s" datasource="par rots">
    SELECT categories.catI D, threads.threadI D, threads.posttyp e, threads.topic, threads.topicID , threads.memberI D, threads.usernam e, threads.postdat e, categories.cate gory, T2.CountReplies
    FROM (categories LEFT JOIN threads ON categories.catI D = threads.catID) LEFT...
    See more | Go to post
    Last edited by grabit; Jun 3 '07, 02:44 AM. Reason: add to post

  • grabit
    replied to Search forms on MS Access database
    I dont know what your using php or asp but i have just built a search function in coldfusion and this is the WHERE statement from my query

    WHERE topic LIKE '%#form.subject #%' OR topic LIKE '% #form.subject#_ ' OR topic LIKE '_#form.subject # %' OR topic LIKE '% _#form.subject# _ %'
    OR username LIKE '#form.subject# '
    OR posttext LIKE '%#form.subject #%' OR posttext LIKE '% #form.subject#_ ' OR posttext LIKE '_#form.subject #...
    See more | Go to post

    Leave a comment:


  • grabit
    started a topic passing search form information

    passing search form information

    Hi Peoples
    i have a search page with a form field "subject" on my results page i have a paging routine . the first page lists its 10 records no trouble but when i click the "next" link i get a error telling me "subject is not defined in form"
    How can i overcome this please.
    I will post the page down to the end of the paging routine coz its not very long anyway.


    [HTML]<cfquery...
    See more | Go to post
    Last edited by acoder; Mar 13 '07, 08:57 AM. Reason: Code in tags

  • grabit
    replied to sql Search
    I have this which seems to work
    <cfquery name="searchRes ults" datasource="#ds n#">
    SELECT threadID, posttype, topic, topicID, postdate, username, threads.catID, posttext, categories.catI D, category
    FROM threads INNER JOIN categories
    ON threads.catID=c ategories.catID
    WHERE topic LIKE '#form.subject# %' OR topic LIKE '% #form.subject#' OR topic LIKE '% #form.subject# %' OR topic LIKE '#form.subject# '...
    See more | Go to post

    Leave a comment:


  • grabit
    started a topic sql Search

    sql Search

    Hi peoples
    I have the following query to return search results. How can i stop this from returning results containg words or phrases like
    "Hi Team, please check latest news. Cheers Rach"
    when i search for "test" and the search string is contained in the word "latest"

    I just want to search for and return the whole words

    Query is
    <cfquery name="searchRes ults"...
    See more | Go to post

  • grabit
    replied to getting reply totals in forum
    Hi yet again Mary
    Nope dropped that AS and no difference
    yes posttype is a column in the threads table

    do you have msm and if so can i contact you there to see if we can speed things up on this please?

    my msm is [email removed]...
    See more | Go to post
    Last edited by MMcCarthy; Mar 12 '07, 01:27 PM. Reason: removed email address - against site rules

    Leave a comment:


  • grabit
    replied to getting reply totals in forum
    thanks Mary
    got it all pasted in there and everything else and when i tried to save it it gave me nearly the same error
    "Syntax error in the FROM clause"
    cheers
    im not much help here eh?
    Grabit...
    See more | Go to post

    Leave a comment:


  • grabit
    replied to getting reply totals in forum
    sorry again Mary
    if i open a query window in design view all i get is tables, queries or both tabs - i cannot for the love of me fins=d any reference to sql, if i dont add any tables to the query i just get a window that looks like i could c&p into it but it is greyed out
    cheers
    Grabit...
    See more | Go to post

    Leave a comment:


  • grabit
    replied to getting reply totals in forum
    Im sorry Mary but i cannot see how to c&p the existing query into access to run it can you polease help me with how to do that please?
    cheers
    Grabit...
    See more | Go to post

    Leave a comment:


  • grabit
    replied to getting reply totals in forum
    sorry Mary
    i already removed that but i still got the same error
    thanks
    Grabit...
    See more | Go to post

    Leave a comment:


  • grabit
    replied to getting reply totals in forum
    Hi Mary
    Again thanks for the help and the prompt reply
    If i run that i get the following error (i see a ( in front of the 2nd SELECT statement - i have tried removing it and no difference)

    error is
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.

    The error occurred in C:\CFusionMX\ww wroot\Forum\top ics.cfm:...
    See more | Go to post

    Leave a comment:


  • grabit
    started a topic getting reply totals in forum

    getting reply totals in forum

    Hi Peoples
    I must first, again thank Mary for her help over the last couple of days.
    I have the following sql that get me all the info i want so far, but have hit a wall when it comes to adding the number of replies per thread.
    In this statement the posttype refered to is a colum that holds 1 for new threads and 2 for replies.
    What i need is to rewrite the statement to return me everything i have so far plus a count of replies...
    See more | Go to post

  • grabit
    replied to Counting posts in forum
    Thanks very very very much Mary
    took out the order by line and shes away laughing
    your a genius. As you will be aware i am a newbie to this sql thing and to find someone who knows what they are doing and are willing to help, is a breath of fresh air on the web today
    Again
    Thankyou
    Grabit...
    See more | Go to post

    Leave a comment:


  • grabit
    replied to Counting posts in forum
    Hi Mary thanks for the reply
    when i use that code i get the following error - can this be fixed and if so how please?

    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

    The error occurred in C:\CFusionMX\ww wroot\Forum\mai nPage.cfm: line 22

    20 : <cfset CurrentPage=Get FileFromPath(Ge tTemplatePath() )>...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...