Call from same DB, different fields

The subject may seem confusing, but it is very simple really. I am new to CF and I am trying to utilize the same DB, but call different values based on where the content is on the page. I have found a way for it to work, but it seems clumsy and extraneous at best. This is the way I have found to do it:
<cfquery name="getGame25" datasource="dbtest">
SELECT  gameID, gameName, gameDev, gameYear, gameConsole
FROM tblGames
WHERE gameID = 25
</cfquery>
<cfquery name="getGame24" datasource="dbtest">
SELECT  gameID, gameName, gameDev, gameYear, gameConsole
FROM tblGames
WHERE gameID = 24
</cfquery>
<cfquery name="getGame23" datasource="dbtest">
SELECT  gameID, gameName, gameDev, gameYear, gameConsole
FROM tblGames
WHERE gameID = 23
</cfquery>
<cfoutput query="getGame25">
<div class="showcaseText"><p><h1>#gameID#. #gameName#</h1></p></div>
<table>
<tr>
<td>Developer:</td><td>#gameDev#</td>
</tr>
<tr>
<td>Dev Year:</td><td>#gameYear#</td>
</tr>
<tr>
<td>Console:</td><td>#gameConsole#</td>
</tr>
</table>
</cfoutput>
<cfoutput query="getGame24">
<div class="showcaseText"><p><h1>#gameID#. #gameName#</h1></p></div>
<table>
<tr>
<td>Developer:</td><td>#gameDev#</td>
</tr>
<tr>
<td>Dev Year:</td><td>#gameYear#</td>
</tr>
<tr>
<td>Console:</td><td>#gameConsole#</td>
</tr>
</table>
...you get the idea..
I am wondering if there is a better way ( a cfloop perhaps) that would cut down on the amount of code and the multiple queries to the DB based on wanting to pull just that specific ID for a specific table. Thanks in advance!

I tried the UNION call out. It is still rendering all 25 fields in DB where I need just the one for each <td>. I think I'm stuck with a DB query for each individual spot on the page, otherwise, it grabs all of the table listings and displays them all. I did try this:
<cfscript>
function GetQueryRow(query, rowNumber) {
var          i = 0;
var          rowData = StructNew();
var          cols          = ListToArray(query.columnList);
for (i = 1; i lte ArrayLen(cols); i = i + 1) {
rowData[cols[i]] = query[cols[i]][rowNumber];
return rowData;
</cfscript>
...it worked, but, again, it rendered all the IDs in the DB and as it calls, it returns a struct, which I don't need. 

Similar Messages

  • I'm using same icloud and same apple ID on two iphones. Now i get calls from same number on both iphones at the same time. How to turn off that?

    I'm using same icloud and same apple ID on two iphones. Now i get calls from same number on both iphones at the same time. How to turn off that?

    Apple ID's are not device specific, so when you changed it on the iPad 2 it changed it on the iPhone 4 as well, since it's the same account still. What you need to do is create a second Apple ID (so you'll have two accounts, one for iPhone 4 and a seperate one for iPad 2).
    To create a new Apple ID on your iPad 2:
    1) Go into Settings > Store.
    2) If you are already signed in, tap your Apple ID on the screen and you will be given a few options, one of which is to sign out of your account.
    3) After you sign out, now click the "Sign in" button.
    4) Tap "Create New Apple ID" and follow the instructions on-screen.

  • TS3406 Twice call from same number if not done anything, the screen is locked

    Iso 7.0.4 - Twice call from  same number (within 3 minutes) if not done anything immediately after the first call, the screen is locked (the added photo of screen). Now no way to access the phone of home screen or something else.
    iso 7.0.4 - Twice call from  same number (within 3 minutes) if not done anything immediately after the first missed call, the screen is locked after second missed call bizzarly. Now no way to access the home screen or something else on the screen by any touch (Back seen on the screen also does not get touched) except force power off and on. Please find the solution for me. 
    and shot) m same number if not done anything, the screen is locked.

    Ok, well I had the network support guy down, when I mentioned an "OD Server" he went into Directory Access and put some details in that seem to have fixed the problem! So thanks for that...
    Unfortunately, it looks like some of the other machines in the room might need binding, but at least the network team is aware of it.
    Whereabouts would I look for ARD crash logs on the affected iMac? I tried locking/unlocking the screen again after the other issue was fixed and had the same problem. Its almost instant - as soon as you hit "lock" the status immediately switches to "ARD Not Active".

  • My IPhone 6 with AT&T is dropping 5-10 calls a day. Calling from same location as my 5S which never had dropped calls. Is this a hardware or software issue?

    My IPhone 6 128GB with current software using AT&T is dropping 5-10 calls a day. I am calling from an office with good signal strength and in the same location as i did with my 5S which almost never had dropped calls. Is this a hardware or software issue? Is this a common issue with the new IPhones?

    Hi jackneedshelp, 
    Thanks for visiting Apple Support Communities. 
    If calls are not going through on your iPhone 6, I recommend going through the troubleshooting method found at this link:
    iPhone: Troubleshooting issues making or receiving calls - Apple Support
    These steps can help identify and resolve the symptom that might be causing the connection issue.  
    All the best,
    Jeremy

  • Concurrent / Parallel remote object calls from same browser app

    Hello Everyone,
    I was wondering how remote requests made to blazeds get served by application servers, when it comes to serving multiple (parallel) remote requests coming from the same application in the same browser.
    Let us say that once you land on an application, you can fire-off 10 independent remote calls.
    Will they all be served by the same request thread in the application server one after another?
    I suspect this because the browser will really only maintain one duplex tcp/ip channel with the blazeds and therefore multiple requests should really just race to the server and get served one after another sequentially based on whichever gets their first.
    This is just what I suspect but I would like to find out from experts on the forum.
    Thanks,
    - Pulkit

    "suspend the main thread, pending a remote call.." No. Can't
    be done.
    ..."pass arguments into the resultHandler..." Yes, this is
    done using the AsyncToken. (ACT pattern)
    The send() methods returns an AsyncToken object. You can use
    this dynamic object to add almost anything you want to the token,
    including strings, and functions (google the term "closure").
    As I am still not comfortable with anonymous functions, I
    like to pass strings. I pass an identifier, which I can use in a
    switch statement to determine the next step. Sometimes I pass a
    "nextStep" string to define finer grain conditionality.
    I use a single dataService object and result handler function
    for all calls.
    Tracy

  • Cell call from one person causes FaceTime to show 2 missed calls at the exact same time from someone else.

    Every time I receive a call from one person, my phone shows in the recent calls list 2 missed FaceTime calls from a totally different person at the same exact time. I've called the second person and asked if they tried to call via FaceTime and the answer is always no. What the heck is going on?

    Hi john_g001,
    If you are having issues with your iPhone apparently adding FaceTime calls to your Recent Calls list when it should not, you may want to try some things to troubleshoot.
    First, quit all running applications and test again -
    iOS: Force an app to close
    Next, I would try restarting the iPhone -
    Turn your iOS device off and on (restart) and reset
    If the issue is still present, you may want to restore the iPhone as a new device -
    iOS: How to back up your data and set up your device as a new device
    Thanks for using Apple Support Communities.
    Best,
    Brett L  

  • TS3510 I have 3 different apple devices using the same Apple ID and would like to use FaceTime to call from one device to the other.  Do I need a different Apple ID for one of the devices in order to do that?

    I have 3 different apple devices (iPod Touch, iPad and MacBook Pro) using the same Apple ID and would like to use FaceTime to call from one device to the other.  Do I need a different Apple ID for one of the devices in order to do that?

    I found this on a related question in the Community:
    Yes you can do it. I do it with 4 different devices all using the same Apple ID.
    You need to associate different email addresses for each device in order to use those email addresses as the "contact at" email address. The reason the calls are dropping on you now is that what you are trying to do is like calling yourself on your own phone.
    You can also create new iCloud accounts on each device simply to use for FaceTime, but I'm guessing that the users of the other two devices have their own email addresses which will make this work for you quite easily.
    Take a look at this for more information.
    The seems to go against what Gail said and the issue you raised about buying dup apps was my first concern.  If this other post is correct, how to I set a different "contact at" in the iPod Touch?
    Goose

  • Completely different AMF request packets for same remote service call from Flex to PHP using ZendAMF

    I was trying to debug why one of the remote-services in our Flex application was failing randomly. What I found was interesting. Completely different AMF request packets were sent for same remote service call from Flex to PHP.
    When the service call succeeds the AMF request packet looks like the following:
    POST /video/flex/bin-debug/gateway.php HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 115
    Cookie: PHPSESSID=j6u30i8uu6c3cvp8f4kipcpf05
    Referer: http://localhost/video/flex/bin-debug/main.swf/[[DYNAMIC]]/5
    Content-type: application/x-amf
    C    ontent-length: 305
    Flex Message (flex.messaging.messages.RemotingMessage)     operation = getMemberFromEvent    clientId = 2F997CD0-7D08-8D09-1A9B-0000422676C8    destination = MembereventService    messageId = B46AB58D-2241-83F0-41E4-9FE745565492    timestamp = 0    timeToLive = 0    body =     [      280    ]    hdr(DSId) = nil
    And when the service fails the AMF request packet looks like this:
    ServiceRequest: getMemberFromEvent; RemoteService; getMemberFromEvent
    (mx.messaging.messages::RemotingMessage)#0
      body = (Array)#1
        [0] 250
      clientId = "1AA4FAAB-AEA5-8109-4B0D-000002B3A9A1"
      destination = "MembereventService"
      headers = (Object)#2
        DSEndpoint = (null)
        DSId = "nil"
      messageId = "2F92E6C0-FE92-A09B-B150-9FE2F28D9738"
      operation = "getMemberFromEvent"
      source = "MembereventService"
      timestamp = 0
      timeToLive = 0
    Also, following is the error message on Flex when the service fails:
    {Fault code=Channel.Call.Failed, Fault string=error, Fault detail=NetConnection.Call.Failed: HTTP: Failed, Destination=MembereventService}
    We are using Swiz as the micro-architecture for Flex development and Zend AMF for remoting between Flex and PHP.
    Any ideas what is wrong here, what is causing Flex to send different request packets for the same service & what I can do to fix it?

    Hi, I know that your post is almost 5 years ago, but have you found the solution to this issue?
    Thanks.

  • Same URL when called from other page when called directly behaves different

    Hi All,
    I am working on SRM 5.0 implementation , the open catalog interface applications are called from a link from the standard ITS  (thses catalog applications are developed in BSP) and then submited back to the ITS application using a URL :
    va r ret_URL = "<% = hook_ur l%>"   <--- this is the return URl to which catalog data is submited
    d ocument.f inal . action = ret_URL;
    d ocument .final .method = " P O S T ";
    d ocument. final. submit ( );
    This application is transfered perfectly if the catalog is called by clicking link on standard ITS application(EBP application) but if i enter the catalog URL(BSP Application URL) directly in the browser and hardcode the value of HOOK_URL (ret_url) in BSP application , the catalog is submited but it shows a blank page with javascript error 'window.opener.isLeanWP' is null or not an object .
    hook_url = http://sapupd.mycompanyname.com:8002/sap/bc/gui/sap/its/bbpsc02/?~OkCode=ADDI&~Target=_top&~Caller=CTLG&~client=200&sap-client=200&~language=EN&~HTTP_CONTENT_CHARSET=utf-8
    Kindly suggest the solution. We need to call the OCI application directly and submit it to ITS application using this hook_url.
    Regards,
    Anubhav

    Please post this question to the Portal Applications forum.
    Thanks,
    Jerry

  • If i used the same apple id and email to set up both my ipad and ipod what can i do to be able to use face time to call from one device to the other

    if i used the same apple id and email to set up both my ipad and ipod what can i do to be able to use face time to call from one device to the other

    They can share an Apple ID, but each device must use a different email address when setting up FaceTime.  Create a gmail email (or hotmail, or ...) address and use that on one of the devices when you setup FaceTime.
    You don't actually have to use the 'new' email address, it is probably just used as an index to reference the correct device when initiating a call via the FaceTime server.

  • How to call multiple stored procedure from same DB Adapter

    Hi,
    I want to invoke 3 stored procedures from my message flow in BUS . I created a DB adapter and invoked 1 successfully . Now I don't to configure 2 other DB adapters for calling other 2 stored procedures . I want some how to be able to call the other 2 from the first DB adapter only . Somehow I need the flexibility to have procedure names as the operation names in 1 wsdl and be able to configure this in JDeveloper for this at time of DB adapter configuration . I am using 11G . Is it possible ?

    You can probably create a DB adapter with operation type selected as Execute Pure SQL and write SQL code to invoke the stored procedures depending on the procedure name (which you can get as one of the parameters of DB Adapter).
    However, Even if you were able to do it, the DB Adapter schemas are generated based on stored procedure parameter list and types. If you use Execute Pure SQL type of DB Adapter the schema will be generated based on the parameters which you are using in your custom SQL code within DB Adapter. Which means that if you want to add a new stored procedure as target which has a different name and different parameters then you will need to regenerate the DB adapter and update your custom SQL code. This also means that you will need to do regression testing interfaces to all stored procedures whenever there is any change in this DBAdapter.
    Now, my question is why do you want to invoke multiple stored procedures from same DB adapter?
    This is not a good way to design integration solutions and makes your services resistance to change as it will take more time to change and test.
    If all that you want is to have a web service which can have different operations for different stored procedures then you should create three business services and create a wrapper proxy service which has one operation for each stored procedure, within the proxy transform and call the correct backend service (you can use operational branch). This way you have a modular code where each module (read interface to one stored procedure) can be independently modified and tested.

  • How to map different fields to same repeating/Same field in XSD

    Hi,
    I am using the Transform activity in a BPEL Process, my source is a Database table and the target is the and XSD file.
    Now the requirement is to map 3 different fields from source to a single field in the XSD.
    In the final xml file the tag name would be the same and will repeat 3 times but with different value for attribute and values with 3 diiferent columns/fields from database.
    How can achive this kind of mapping. Do i need to use some functions etc for that? please guide
    regards

    To answer "What does "<ns1:Code>" and "<ns1:Id>" indicate? are they fields in the DB table or XSD Schema?".
    The transformation is from Source(database) to target(an XML file).
    "<ns1:Code>" and "<ns1:Id>" are tags/fields in the outbound XML.
    <dbcolumn1>,<dbcolumn2> and <dbcolumn3> are database columns.
    I have removed the "ns1:" and also the Condition to make the code easy to read. Hope it helps. You could remove the condition and see how it goes when trying out in your project.
    <xmltag1_non repeating>
    <xsl:choose>
         <xsl:when test="SOME CONDITION" >
         <xml_tag2_repeating>
              <xsl:if test="SOME CONDITION">
                   <Code>
                   <xsl:value-of select="string(&quot;SOME VALUE 1 &quot;)"/>
                   </Code>
              </xsl:if>
              <xsl:if test="SOME CONDITION">
                   <Id>
                   <xsl:value-of select="dbcolumn1"/>
                   </Id>
              </xsl:if>
         </xml_tag2_repeating>
         </xsl:when>
    </xsl:choose>
    <xsl:choose>
         <xsl:when test="SOME CONDITION" >
         <xml_tag2_repeating>
              <xsl:if test="SOME CONDITION">
                   <Code>
                   <xsl:value-of select="string(&quot;SOME VALUE 2 &quot;)"/>
                   </Code>
              </xsl:if>
              <xsl:if test="SOME CONDITION">
                   <Id>
                   <xsl:value-of select="dbcolumn2"/>
                   </Id>
              </xsl:if>
         </xml_tag2_repeating>
         </xsl:when>
    </xsl:choose>
    <xsl:choose>
         <xsl:when test="SOME CONDITION" >
         <xml_tag2_repeating>
              <xsl:if test="SOME CONDITION">
                   <Code>
                   <xsl:value-of select="string(&quot;SOME VALUE 3 &quot;)"/>
                   </Code>
              </xsl:if>
              <xsl:if test="SOME CONDITION">
                   <Id>
                   <xsl:value-of select="dbcolumn3"/>
                   </Id>
              </xsl:if>
         </xml_tag2_repeating>
         </xsl:when>
    </xsl:choose>
    </xmltag1_non repeating>

  • Call multiple functions from same dll with call library function

    hi,
    i am working on a project in wich we need to make a UI to read out a sensor network.
    the UI should be usable in any project, but every node needs a different piece of code depending on the type of sensor with wich it is equipt.
    so i need to be able to call different pieces of code when i need them, and still be able to use the UI in future projects with possibly new types of node we now don't have.
    so someone told me to use DLL's, cause then i would be able to call the code i need the moment i need it.
    but i have never worked with DLL's (just learned about this option 3 day's ago) so i have a question.
    i know i can dynamicly change the DLL i call with the call library function, but can i dynamicly change the function i call from that DLL ?
    or do i have to put a new call library function for each function i want to call, even if its from the same DLL ?
    kind regards,
    stijn

    nazarim wrote:
    ok so there is no (easy and ubderstandable) way for me to dynamicly change wich function i want to call from a certain DLL.
    but now i started wondering, the path on the call library function is not ment to dynamicly change a DLL
    but it does work so, if i am carefull, can i use it for that purpose or will labview give me a series of problems once i start using it in larger programs ?
    Thepath on the Call Library Node can be used to load a different DLL. Obviously since you can't change the function name your other DLL would have to export exactly the same function name and of course with the same parameters. This is seldom the case so it is not the main use of the path input to the Call Library Node. It's main use is as indicated to load DLLs at runtime rather than at load time of a VI. So that an application can run even when the DLL is missing, until the moment the functionality from that DLL is needed.
    If you can make sure that all your DLLs export the same function name with the same parameter you can use the Call Library Node to call into different DLLs through the path input. If however you would need to call different function names you would have to resolve to some DLL which does do the dispatching and invocation using LoadLibrary() and GetProcAddress(). But unless you need to go with DLLs for some reason using the Call By Reference Node can give you an even more flexible approach. 
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • 'BAPI_QUOTATION_CREATEFROMDATA2'  behaves different while called from SE38

    Dear Friends
    I am trying to run the bapi 'BAPI_QUOTATION_CREATEFROMDATA2' and 'BAPI_TRANSACTION_COMMIT' in proper sequence as recommended by SAP.
    I am entering the minimum data recommended by SAP help on this BAPI.
    When I run the above senario manually from transaction SE37 and selecting
    from the menu  Function Module -> Test -> Test Sequence,
    everything works fine and this also creates a quote and when I check, it
    is adding lots of extra related data.
    However, when I call the same two functions from another program (SE38),
    even though I am entering the same Data, I get different behaviour and
    also the quote is not getting created. When I check the ls_return value,
    it says that 'sold-to-party' is missing.  I don't know why this problem
    doesn't arise when I run the BAPI manually from SE37.
    I would appreciate if you can please give me any feedback or some expert comments.
    Please see the SE38 program that I am using to test these two BAPIs.
    ==========================================================
    *& Report  ZQUOTECREATE_TEST
    report  zquotecreate_test.
    data: ls_quotation_header_in        type  bapisdhd1,
          ls_behave_when_error          type  bapiflag-bapiflag,
          ls_quotation_partners         like  bapiparnr occurs 1 with header line,
          ls_return                     like  bapiret2  occurs 1 with header line.
    ls_quotation_header_in-distr_chan = '12'.
    ls_quotation_header_in-division = '00'.
    ls_quotation_header_in-sales_org = '1000'.
    ls_quotation_header_in-doc_type = 'AG'.
    ls_behave_when_error              = 'P'.
    ls_quotation_partners-partn_role = 'SP'.
    ls_quotation_partners-partn_numb = '1012'.
    call function 'BAPI_QUOTATION_CREATEFROMDATA2'
      exporting
        quotation_header_in            = ls_quotation_header_in
        BEHAVE_WHEN_ERROR              = ls_BEHAVE_WHEN_ERROR
    importing
      salesdocument                  =  ls_salesdocument
      tables
        return                         = ls_return
        quotation_partners             = ls_quotation_partners
    call function 'BAPI_TRANSACTION_COMMIT'
    exporting
       wait          = ' '
    IMPORTING
      RETURN        =

    Dear friends
    I figured out the conversion problem involving 'QT' and 'AG'.
    There is this flag 'CONVERT' which doesn't affect while running manually but while calling from SE38, I have to turn it on by putting a value 'X" and so the AG-QT issue is resolved
    So if you can please respond to the other problem with error 'Please enter sold-to-party or ship-to-party', I would appreciate.
    Again with the same test data, the above error message doesn't show up while running the BAPI manually from SE37 and QUOTE gets created successfully. However, when the same BAPI is called from SE38 program I get the above error message and QUOTE doesnt get created.

  • Show a different view when called from different app.

    Hi,
    I have the requirement of showing a different view in the same window when called from different apps (urls).
    I have created different start-up inbound plugs and assigned them to the different apps but I can't figure out how to code the view switch.
    Any idea?
    thanks in advance,
    David R.

    hi,
    It is possible.
    Click on the Properties tab of application.In that screen click on the seach help option against Interface view.It will show all views you have created. Select the desired view to which the application has to point.
    Don't forget to give the  plug name which is under that interface view
    Now the application invokes the new view which u have pointed.
    If you have doubts in this please inform me.
    Regards,
    Ramanan
    Edited by: Ramanan Panchabakesan on Sep 3, 2008 1:50 PM
    Edited by: Ramanan Panchabakesan on Sep 3, 2008 1:51 PM

Maybe you are looking for

  • How can I disable the Voicemail button on an iPhone 4

    How can I disable the Voicemail button on an iPhone 4 or if that is not possible can i programme it to dial my own phone rather than my carrier's Voicemail box?

  • Shift+A not working

    The machine is a Macbook with 2GHz and 1GB ram. Shift+A is not working. The shift key will work when capitalizing any of the other letters except A. Anyone know what this problem is?

  • After exporting - music and pictures out of sync

    After using the workaround to attach my six songs as one (using Garage Band - thanks!) to my 434 slides, I tweaked the presentation so that the music and pictures were synced perfectly. However, once I exported them they slowly got out of sync, final

  • Enabling CFS for IIS sites

    Hello, can I enable CFS for some sites in IIS and disable it for others? Or should CFS be enabled for all the sites once it is installed? Thanks,

  • Exporting to Media Browser & Chapters etc

    Hi People, I just finished editing my wedding video in iMovie 08 and everything looks great. I need to add chapters so that my relatives can skip to different locations in the movie. I read that the only way to add chapters is to add it to the media