[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

4.4

Need a query for MySQL to pull dates by camera to populate back into a JavaScript calendar

Asked by PaulyWolly in MySQL Server, JavaScript, Programming for ASP.NET, Programming, SQL Query Syntax

Tags: MySQL, 5, query

I have an application that runs on an ASP.NET platform with MySQL as the database back end. I also use JavaScript to do much of the functionality. This system records data from a web cam as a series of images and stores them into the database as images, after being processed into video clips (.FLV files). To get the system to run you need to login as a user (eg. user1). For this account lets say you have 3 web cams - cam1, cam2, and cam3. To start a session you choose which cam will be the active cam. Let's choose cam1.

On a particular day I start cam1, and record, then stop, then start a new record session and then some time later stop. Every time you start a record session a DateTime stamp is stored in the database for that user account and the cam used. If you open cam2 and/or cam3 you can do the same.

I have a JavaScript calendar control on the page and when I choose a particular day in the calendar I can pull out all the videos recorded for that chosen day and list them for the active cam. if I choose a different day I can see the videos for that day, and so on.

As I look at the page I see the calendar control and the list of videos for that chosen day, and when I look closer at the calendar control I see that ONE day is highlighted to give me the list of videos for THAT day.

What I need is a query for my MySQL database to tell me all the dates that have videos for the active camera and I need to popuate those dates in the calendar control so that at a glance I can choose any of those highlighted dates in the calendar control and I can see the list of videos for that chosen date. Obviously if there were no recordings for that day then the day would not be highlighted.

Here is the table, fields and field types I am working with:

IMAGE table
-----------------
IMAGE_ID - int (autonumber)
IMAGE_RECEIVED - DateTime
CAMERA_ID - INT
IMAGE - BLOB
CUSTOMER_ID_FK - INT

Example sessions as shown in the databae via a dump:
------------------------------------------------------------------------------------------
IMAGE_ID   CAMERA_ID     CUSTOMER_ID_FK   IMAGE    IMAGE_RECEIVED
           
('1', '6997', '1', '(Binary)', '10/24/2008 6:57:35 PM'),
('2', '6997', '1', '(Binary)', '10/27/2008 11:41:49 AM'),
('3', '6997', '1', '(Binary)', '10/27/2008 11:41:58 AM'),
('4', '6997', '1', '(Binary)', '10/27/2008 11:42:10 AM'),
('5', '6997', '1', '(Binary)', '10/27/2008 12:29:21 PM'),
('6', '6997', '1', '(Binary)', '10/27/2008 1:06:03 PM'),
('7', '6997', '1', '(Binary)', '10/27/2008 2:21:13 PM'),
('8', '6997', '1', '(Binary)', '10/27/2008 2:56:28 PM'),
('9', '6997', '1', '(Binary)', '10/27/2008 4:30:44 PM'),
('10', '6997', '1', '(Binary)', '10/27/2008 4:36:06 PM'),
('11', '6997', '1', '(Binary)', '10/27/2008 4:36:21 PM'),
('12', '7024', '113', '(Binary)', '10/27/2008 6:00:19 PM'),
('13', '7024', '113', '(Binary)', '10/27/2008 6:00:21 PM'),
('14', '7024', '113', '(Binary)', '10/27/2008 6:01:51 PM'),
('15', '7024', '113', '(Binary)', '10/27/2008 6:20:45 PM'),
('16', '7024', '113', '(Binary)', '10/27/2008 6:20:59 PM'),
('17', '6997', '1', '(Binary)', '10/28/2008 2:46:55 PM'),
('18', '6997', '1', '(Binary)', '10/28/2008 3:02:07 PM'),
('19', '6997', '1', '(Binary)', '10/28/2008 3:02:23 PM'),
('20', '6997', '1', '(Binary)', '10/28/2008 4:25:01 PM'),
('21', '6997', '1', '(Binary)', '10/28/2008 4:42:34 PM'),
('22', '6997', '1', '(Binary)', '10/28/2008 4:42:44 PM'),
('23', '6997', '1', '(Binary)', '10/28/2008 4:43:05 PM'),
('24', '7050', '1', '(Binary)', '10/30/2008 5:47:04 PM'),
('25', '7050', '1', '(Binary)', '10/30/2008 5:49:20 PM'),
('26', '7050', '1', '(Binary)', '10/30/2008 5:49:21 PM'),
('27', '7050', '1', '(Binary)', '10/30/2008 5:49:32 PM'),
('28', '7050', '1', '(Binary)', '10/30/2008 5:49:47 PM'),
('29', '7050', '1', '(Binary)', '10/30/2008 5:50:48 PM'),
('30', '7092', '122', '(Binary)', '11/4/2008 10:14:12 PM'),
('31', '7032', '113', '(Binary)', '11/5/2008 12:23:22 PM'),
('32', '7032', '113', '(Binary)', '11/5/2008 12:23:29 PM'),
('33', '7026', '118', '(Binary)', '11/5/2008 2:58:15 PM'),
('34', '7032', '113', '(Binary)', '11/5/2008 3:29:14 PM'),
('35', '7032', '113', '(Binary)', '11/5/2008 3:29:16 PM'),
('36', '7032', '113', '(Binary)', '11/5/2008 3:29:18 PM'),
('37', '7050', '1', '(Binary)', '11/10/2008 3:13:28 PM'),
('38', '7050', '1', '(Binary)', '11/10/2008 3:13:45 PM'),
('39', '7050', '1', '(Binary)', '11/10/2008 3:34:23 PM'),
('40', '7050', '1', '(Binary)', '11/10/2008 3:34:25 PM'),
('41', '7050', '1', '(Binary)', '11/10/2008 5:10:55 PM'),
('42', '7032', '113', '(Binary)', '11/10/2008 5:41:06 PM'),
('43', '7032', '113', '(Binary)', '11/10/2008 5:41:12 PM'),
('44', '7032', '113', '(Binary)', '11/10/2008 5:41:29 PM'),
('45', '7032', '113', '(Binary)', '11/10/2008 5:45:31 PM'),
('46', '7032', '113', '(Binary)', '11/10/2008 5:48:01 PM'),
('68', '7050', '1', '(Binary)', '11/11/2008 1:25:01 PM'),
('69', '7050', '1', '(Binary)', '11/11/2008 1:48:30 PM'),
('70', '7050', '1', '(Binary)', '11/11/2008 1:54:34 PM'),
('71', '7050', '1', '(Binary)', '11/11/2008 1:55:48 PM'),
('72', '7050', '1', '(Binary)', '11/11/2008 1:55:55 PM'),
('73', '7050', '1', '(Binary)', '11/11/2008 1:55:59 PM'),
('74', '7050', '1', '(Binary)', '11/11/2008 1:56:45 PM'),
('75', '7050', '1', '(Binary)', '11/11/2008 1:58:52 PM')  

Currently I CAN choose a day and view the image clips for that day, if there are images for that day. If I want to see if any other days have data, I have to click each day and hope I can see data for that date. I just want to be able to have my query do the work for me and let me know which days have images when I have an active CAMERA and have that information populated in my calendar control as highlighted dates so that I can choose a date that HAS data instead of having to search for a day that has data.
[+][-]12/12/08 08:04 AM, ID: 23158353Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/14/08 09:43 AM, ID: 23168730Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]12/15/08 03:26 AM, ID: 23172399Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/15/08 01:27 PM, ID: 23178050Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/15/08 01:39 PM, ID: 23178220Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/15/08 01:58 PM, ID: 23178393Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/15/08 02:01 PM, ID: 23178411Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/15/08 02:18 PM, ID: 23178564Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/15/08 02:37 PM, ID: 23178697Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/17/08 08:22 PM, ID: 23200637Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/18/08 03:19 AM, ID: 23202257Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/21/08 07:19 AM, ID: 23222070Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/21/08 07:20 AM, ID: 23222075Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/21/08 07:25 AM, ID: 23222100Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/21/08 07:27 AM, ID: 23222109Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/21/08 07:45 AM, ID: 23222169Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/21/08 07:54 AM, ID: 23222188Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/21/08 08:10 AM, ID: 23222228Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/21/08 08:16 AM, ID: 23222241Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/21/08 10:26 AM, ID: 23222620Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/21/08 11:47 AM, ID: 23222908Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/21/08 12:00 PM, ID: 23222954Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/21/08 12:54 PM, ID: 23223155Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/21/08 05:05 PM, ID: 23223934Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/21/08 06:33 PM, ID: 23224411Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/21/08 07:14 PM, ID: 23224494Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/21/08 07:16 PM, ID: 23224501Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/22/08 02:44 AM, ID: 23225608Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/22/08 07:19 AM, ID: 23226921Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/22/08 07:30 AM, ID: 23227001Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/22/08 07:43 AM, ID: 23227090Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/22/08 08:15 AM, ID: 23227333Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/22/08 08:19 AM, ID: 23227366Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/22/08 08:20 AM, ID: 23227374Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/22/08 08:27 AM, ID: 23227429Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/22/08 12:13 PM, ID: 23229194Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/22/08 12:33 PM, ID: 23229354Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/22/08 02:58 PM, ID: 23230372Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/23/08 03:30 AM, ID: 23232729Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/23/08 07:36 AM, ID: 23234210Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/27/08 05:16 PM, ID: 23250047Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: MySQL Server, JavaScript, Programming for ASP.NET, Programming, SQL Query Syntax
Tags: MySQL, 5, query
Sign Up Now!
Solution Provided By: PaulyWolly
Participating Experts: 1
Solution Grade: A
 
[+][-]12/29/08 03:40 AM, ID: 23255049Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_2_20070628