php - UNIX_TIMESTAMP(timestamp) use -


I am trying to get the unix_timestamp value for a specific timestamp column. But I'm confused $ timecheck = mysql_query ("selection by UNIX_TIMESTAMP (datetime) machine where m_id = $ m_id"); If (mysql_num_rows ($ timeshack)> gt; {while ($ timefetch = mysql_fetch_object ($ timeshack)) {echo $ timefetch-> Datetime; Print_r ($ timefetch [0] - & gt; datetime); If (($ timetate-> datetime-time ()) 6000) {echo "1"; } And {echo "0"; }}

Timestamp value is a stdClass object that can not be used to compare it please anybody please help me with the code given below

Use the alias for the column name in your SQL query:

  SELECT UNIX_TIMESTAMP (datetime) Machine from as datetime where m_id = $ m_id    

Comments