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

  • SEARCH
  • Home
  • 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 8120801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:16:09+00:00 2026-06-06T05:16:09+00:00

I am a lot more at home manipulating arrays and objects in php or

  • 0

I am a lot more at home manipulating arrays and objects in php or javascript, and do next to no work with coldfusion.

I have one query pulling data from mysql. I would like to store results list or array ( or simpler approach)

WHile looping over a second query from msql that generates html output I need to see if one value is contained in prior mysql array or list.

Have tried playing with varierty of cf array/list methods and really not sure what best approach is to resolve following if.
CF version is 9

<cfquery datasource="Mysql" name="premium_submitters">
  SELECT submitter_id from table  
</cfquery>
<!--- Need loop to store to array or list??--->

<cfquery datasource="Sql" name="main_data">
    SELECT * from table
</cfquery>

<cfoutput query="main_data">
    <cfif #submiiter_id# <!---is in Mysql array/list return boolean---> >

    </cfif>
</cfoutput>
  • 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-06T05:16:11+00:00Added an answer on June 6, 2026 at 5:16 am

    Use ValueList to get the value of one column of a query into a list.

    <cfquery datasource="Mysql" name="premium_submitters">
      SELECT submitter_id from table  
    </cfquery>
    
    <cfset submittersList = ValueList(premium_submitters.submitter_id)>
    
    <cfquery datasource="Sql" name="main_data">
        SELECT * from table
    </cfquery>
    
    <cfoutput query="main_data">
        <cfif ListFind(submittersList, main_data.submitter_id) gt 0>
          <!--- is in list, do whatever --->
        </cfif>
    </cfoutput>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some models that are laid out like so (with a lot more
I have a table with a lot of records (could be more than 500
I'm working a lot more with JavaScript in node.js. My application has the following
This is a lot more complicated than it might seem at first. What I
I find smart pointers to be a lot more comfortable than raw pointers. So
I am new to prototype and finding it a lot more difficult than jquery.
Imagine this case, but with a lot more component buckets and a lot more
I previously worked a lot with Java and now I am working more with
This is more of a maths question than programming but I figure a lot
I read a lot of links and suggestions and after all I'm even more

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.