sandy1028 Posted February 26, 2008 Share Posted February 26, 2008 Hi, The values from the database is shown below. When there is no data for the timestamp 14:00:01 How can I find out the timestamp 14:00:01 is not there in database and in the graph I have to mark as 0. Please help me with this 2008-02-26 13:50:01| 13.0 2008-02-26 14:20:01 | 13.0 | | 2008-02-26 14:40:01 | 13.0 | | 2008-02-26 15:00:01 | 13.0 | | 2008-02-26 15:20:02 | 13.0 | | 2008-02-26 15:40:01 | 13.0 | Quote Link to comment Share on other sites More sharing options...
uniflare Posted February 26, 2008 Share Posted February 26, 2008 are you trying to find out wether a field is empty? or if a field in a specific row in an array or row data is empty? former: use a mysql statement like so: SELECT `id` FROM `mytable` WHERE `timestamp`=NULL latter: get all result rows regardless first, then loop through them and check them 1 by one, you could also add an "ORDER BY `timestamp`" clause to your query to bundle all rows without a timestamp together. hope this helps, Quote Link to comment Share on other sites More sharing options...
sandy1028 Posted February 26, 2008 Author Share Posted February 26, 2008 The timestamp is not present in the database it self. How can I get the timestamp as NULL> In database it is not updated. Quote Link to comment Share on other sites More sharing options...
uniflare Posted February 26, 2008 Share Posted February 26, 2008 ok youve just confused me... (not hard to do) Do you want to get the timestamp? make the timestamp or insert the timestamp to a db? i dont know what exactly your trying to do. Quote Link to comment Share on other sites More sharing options...
sandy1028 Posted February 26, 2008 Author Share Posted February 26, 2008 I want the maketime but the values in database and system time soesnot match how to avoid it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.