Now why am i recieving these errors and how can i fix these errors below
'ErrorYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':01)-TIMEDIFF(05:41) WHERE who=‘User a’
Now am i doing wrong with my query above or somthing is there somthing i need to fixed as i am only wanting to know the difference between the 2 minutes and hours?
Try to ask more clear question.
You mentioned 2 functions in your post, timedifference() and calcTime(), but provided no code for both of them
Also I doubt that you need PHP calculation, because your previous question was about mysql and you’re using $data[‘who’] variable which I suspect come from the database
i could do it manually but i want my php script to do it as the date is stored in the mysql database and i want to know how many hour it has been since then that is all.
depends on whether either of both of the parameters involved in calculating the difference actually come from the database
i want my php script to do it as the date is stored in the mysql database and i want to know how many hour it has been since then
this sounds to me like a calculation of the difference between a stored datetime and the current datetime
i suppose you ~could~ pull the stored datetime from the database and then do the calculation in php, but you’d have to be application-code oriented as opposed to database-extract oriented to want to do it that way