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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.