Results 1 to 3 of 3
Thread: Counting 2 statements
Threaded View
-
07-28-2009, 04:59 AM #1Newbie
- Join Date
- Jul 2009
- Posts
- 8
Counting 2 statements
Hello,
I have 2 sql statements
1) select count(task_id) as count_task from tbl_employee_task,tbl_employee where
tbl_employee_task.employee_id = tbl_employee.employee_id group by task_id
2) select count(todo_id) as count_todo from tbl_employee_todo,tbl_employee where
tbl_employee_todo.employee_id = tbl_employee.employee_id group by todo_id
now what I want to display is a list with all the employees who have tasks + todo
is there a way to do it in one sql statement?
thanks!
Similar Threads
-
mysql_query - while statements?
By thomase in forum Programming DiscussionReplies: 1Last Post: 09-14-2008, 12:57 PM -
PHP, MySQL and If Statements (Echo)
By smellybob in forum Web Design and ContentReplies: 1Last Post: 07-06-2007, 06:55 PM -
Hearing set on signing statements
By case in forum Web Hosting LoungeReplies: 2Last Post: 06-30-2006, 01:13 PM -
LIKE Operator for IF Statements?
By twooly in forum Programming DiscussionReplies: 3Last Post: 02-22-2004, 06:44 PM