Php And Mysql

new and need help

Page 1 of 1

4 Replies - 2248 Views - Last Post: 25 March 2005 - 10:18 PM Rate Topic: -----

#1 bucknakie   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 25-March 05

Php And Mysql

Posted 25 March 2005 - 10:03 PM

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 March 2005 - 10:04 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Php And Mysql

#2 DanceInstructor   User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 18-March 05

Re: Php And Mysql

Posted 25 March 2005 - 10:09 PM

So... how do you know that a time is a finish time or a begin time?
Was This Post Helpful? 0
  • +
  • -

#3 bucknakie   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 25-March 05

Re: Php And Mysql

Posted 25 March 2005 - 10:11 PM

In the text field it say scan started and then scan finished in a new row
Was This Post Helpful? 0
  • +
  • -

#4 DanceInstructor   User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 18-March 05

Re: Php And Mysql

Posted 25 March 2005 - 10:15 PM

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 March 2005 - 10:17 PM

Was This Post Helpful? 0
  • +
  • -

#5 skyhawk133   User is offline

  • Head DIC Head
  • member icon

Reputation: 1972
  • View blog
  • Posts: 20,426
  • Joined: 17-March 01

Re: Php And Mysql

Posted 25 March 2005 - 10:18 PM

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

Quote

TIMEDIFF(expr,expr2)

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1