[Glastonbury] Mysql

peter glastonbury at mailman.lug.org.uk
Wed Jul 23 20:41:01 2003


I am now starting to play with mysql.

What i have is a table with dates job number hours on job and  the
person who put the hours on the job.

What i want to do is be able to get a total number of hours for the job.

I have been able to query to show the job no required and the daily
hours spent on the job. 

SELECT Ref_No,Hrs
FROM `records`
where Ref_No = 'D2071'

What i want to do is get the total hours 
any ideas?

i have tried 
select sum( hrs) as 'total hours'
>From records 
where ref_no = D2071 

excuse the syntax.


I have been using the mysql cook book.


regards

-- 
peter <colep@nascr.net>