Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 132,462 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,376 people online right now. Registration is fast and FREE... Join Now!




Php And Mysql

 
Reply to this topicStart new topic

Php And Mysql, new and need help

bucknakie
post 25 Mar, 2005 - 09:03 PM
Post #1


New D.I.C Head

*
Joined: 25 Mar, 2005
Posts: 3

Hi All

I am pretty new at using PHP and MySql so if this seems like a very basic question please don't point and laugh.

He is the deal I have a MySql database that I need to get my data from and what I need to do is using php and Mysql

the MySql table is called eventlog using the name, text ,and time columns I need to get and figure the time it took for a scan to run. In the time column I have the start time and the finish time these are different rows in the database. The format is HH:MM:SS. From the text column I can see when a scan starts and stops. So my idea is to some how look at the finish time and subtract it from the start time and get total time it took.

Now using the same info I would like to be able to take all scans for 1 machine and then figure how what the average time for scans is per machine.

thanks in advance for any help offered

This post has been edited by bucknakie: 25 Mar, 2005 - 09:04 PM
User is offlineProfile CardPM

Go to the top of the page

DanceInstructor
post 25 Mar, 2005 - 09:09 PM
Post #2


New D.I.C Head

Group Icon
Joined: 18 Mar, 2005
Posts: 41



Dream Kudos: 25
My Contributions


So... how do you know that a time is a finish time or a begin time?
User is offlineProfile CardPM

Go to the top of the page

bucknakie
post 25 Mar, 2005 - 09:11 PM
Post #3


New D.I.C Head

*
Joined: 25 Mar, 2005
Posts: 3

In the text field it say scan started and then scan finished in a new row
User is offlineProfile CardPM

Go to the top of the page

DanceInstructor
post 25 Mar, 2005 - 09:15 PM
Post #4


New D.I.C Head

Group Icon
Joined: 18 Mar, 2005
Posts: 41



Dream Kudos: 25
My Contributions


Does the time column contain date info or just hours/secs info? Doh! ignore that question I should learn to read.

This post has been edited by DanceInstructor: 25 Mar, 2005 - 09:17 PM
User is offlineProfile CardPM

Go to the top of the page

skyhawk133
post 25 Mar, 2005 - 09:18 PM
Post #5


Head DIC Head

Group Icon
Joined: 17 Mar, 2001
Posts: 14,844



Thanked 45 times

Dream Kudos: 1650

Expert In: Web Development

My Contributions


There is a function in mySQL called TIMEDIFF, you would pass begin time, end time

QUOTE
TIMEDIFF(expr,expr2)
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 01:15PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month