Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

Result query more than one record? (1 reply)

$
0
0
In my Java application I query, and get back one record. What if a new query gets back more records, like a table?

For instance:
SELECT `project`,`activity,
        SEC_TO_TIME(SUM( TIME_TO_SEC(`worked_time`)))
FROM `projects`
WHERE `day` <= "2017-04-09" # Sunday
  AND `day` >= "2017-04-03" # Monday, start week
  AND `active` = 1
GROUP BY `project`, `activity`;

This will result in:
project 		Activity 	worked_time
Flubber			Specific	03:00:00
Promotion activities 	01 Search	01:15:00
Promotion activities 	Travel		03:00:00
UB Development 		Development 	05:00:00
Work and information 	Travel		01:30:00
Work and information 	Symposium 	04:30:00

How do I read this result from the database, and display it into my application?

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>