Jump to content

timestamp


sandy1028

Recommended Posts

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 |

Link to comment
https://forums.phpfreaks.com/topic/93077-timestamp/
Share on other sites

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,

Link to comment
https://forums.phpfreaks.com/topic/93077-timestamp/#findComment-476866
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.