Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8965261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:46:18+00:00 2026-06-15T16:46:18+00:00

Somehow when running some queries in CF while using existing variables, there is no

  • 0

Somehow when running some queries in CF while using existing variables, there is no output showing up. These are the queries:

<cfquery name = "group" datasource = "#DSN#">
        SELECT *
        FROM groups
        WHERE ownerid=#user.id#
        ORDER by id
        LIMIT 0, 30
</cfquery>
<cfquery name = "groups" datasource = "#DSN#">
        SELECT *
        FROM group_requests
        WHERE groupid=#group.ownerid#
        ORDER by groupid
        LIMIT 0, 30
</cfquery>

<cfoutput query="groups">
#groupid#
</cfoutput>

As you can see first it gets the all the values from the #user.id# and afterwards it uses the value from the first query again in #groep.ownerid#. Somehow this won’t show any output value. And yes, there are values to be shown.

Kind regards,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:46:19+00:00Added an answer on June 15, 2026 at 4:46 pm

    I guess problem is that if 1st query returns multple records only first group.ownerid is used — which can give no matches, or much less than you are expecting.

    If results of the 1st query aren’t use elsewhere, I would suggest to have it all in the single query. Something like this:

    <cfquery name = "groups" datasource = "#DSN#">
        SELECT *
        FROM group_requests
        WHERE groupid in
        (
            SELECT ownerid
            FROM groups
            WHERE ownerid = <cfqueryparam cfsqltype="cf_sql_integer" value="#user.id#" />
            LIMIT 0, 30
        )
        ORDER by groupid
        LIMIT 0, 30
    </cfquery>
    

    Also I’m not sure if it makes sense to have two limits here, but there’s not enough information to make a meaningful suggestions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running into some problem, I created a type that I am using
I'm using some ruby code wrapped in a begin - rescue block but somehow
I've been using TortoiseHG for some time now and I've been running into the
I am using Watin to do some automated testing and I am running IE
I am running Windows 7 Ultimate and Visual Studio 2010 Ultimate. Somehow, in some
I have a nodeJS server running. There are some requests that the server will
I have a VPS that is running Fedora Core 6, with yum somehow removed
We have several Python 2.6 applications running on Linux. Some of them are Pylons
My currently running activity B should be destroyed using 'finishActivity(999)'. Doing so, I want
I'm finding the scala '-i' command line option quite useful for running some scala

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.