I am trying to get the unix_timestamp value for a specific timestamp column. But I'm confused 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: $ 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"; }}
SELECT UNIX_TIMESTAMP (datetime) Machine from as datetime where m_id = $ m_id
Comments
Post a Comment