Forum Moderators: coopster

Message Too Old, No Replies

Post query result above where query is run

         

charger9

4:59 pm on Dec 21, 2011 (gmt 0)

10+ Year Member



I'm building a dashboard with multiple queues for a business workflow. I have divs with the queue title. When you click the div, it uses a jQuery solution I found online to show another div with the entries in that queue.

I've run my query in the second div to display multiple results. I want to show the number of entries in the queue in the top div so you can see it without clicking. Obviously I can't do that before I run the query.

I'm learning as I go and am not sure how to address this issue, any help is appreciated!

eelixduppy

9:41 pm on Dec 29, 2011 (gmt 0)



>> Obviously I can't do that before I run the query.

Correct. You will have a run a query to know how many results will be returned. Depending on how many 'queues' you have here, you can run a single query at the beginning that counts how many tuples are in each queue and then display each count in the appropriate place.

eg:


select queue_name, count(*) noelements from queues group by queue_name