php - Inconsistent calculating in Mysql -


i trying calculate elapsed time , corrected time mysql table. elapsed time returned fine, corrected time not showing. timing issue? not making variable , calling in same query. can tell me start on this?

select *, timediff(now(),`starttid`) 'elapsed',  time_format((timediff(now(),`starttid`) )* `rating` ,'%h:%i:%s') 'korr_tid' faerder15_  `seilnummer` '$select'  order time_format(sec_to_time(timediff(now(),`starttid`)  )* `rating` ,'%h:%i:%s') desc 

the code run on rpi.

here extract of table:

 id | seilnummer | type  | navn | skipper | seilforening | startklasse | klasse | rating | starttid ============================================================================================================== 16 | nor 12     | if    | mad  | rob b   | b yacht      | if          | if-båt | 0.0000 | 2015-04-15 13:30:00 92 | nor 54     | fenix | kris | joa b   | m yacht      | t&h         |        | 0.8091 | 2015-04-15 00:00:00    

try time multiplication

sec_to_time( time_to_sec( timediff( now(),`starttid`) )* `rating` ) 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -