CodingPHP MySQL Charts/Graphs

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  CHYRON (DSMITHHFX)  
 To:  Drew (X3N0PH0N)     
40466.36 In reply to 40466.34 
That choked my dual core 2.5g.

----
"Some ideas make you dumber the moment you learn of them."
0/0
 Reply   Quote More 

 From:  ANT_THOMAS   
 To:  CHYRON (DSMITHHFX)     
40466.37 In reply to 40466.35 
There isn't really any developing/debugging as such. I've been playing with temperature sensors with my RPis and I wanted to put one outdoors and I decided it would be nice to look at the data in a graph. Every minutes is definitely overkill but it's very quick when I access the data locally, I think it would be slow even if the data was held on the hosting server, especially when it gets to weeks and months worth of data.
0/0
 Reply   Quote More 

 From:  af (CAER)  
 To:  CHYRON (DSMITHHFX)     
40466.38 In reply to 40466.35 
At that rate, 24 hours' worth is only 60k or so – 1440 data points per series, which is not a huge amount, and like I said earlier, even my phone can handle that with no noticeable slowing.
0/0
 Reply   Quote More 

 From:  koswix  
 To:  Drew (X3N0PH0N)     
40466.39 In reply to 40466.34 
No drop shadow! :O

 ▪                    
             ┌────┐    ┌────┐                      
          │    │    │    │ ▪                    
          │    └────┘    │                      
          │   ──┐  ┌──   │ ▪                    
   ┌──────┤    ▪    ▪    │                      
  ┌┘      │              │ ▪                    
┌─┤       └──┐  │  │  ┌──┘                      
│ │          │ ││  ││ │   ┌─┐                   
│ │          └─┼┤  └┴─┴───┘ │                   
│ │           ─┘│           │                   
│ │   ┌──────┐  └┬──────────┘                   
  │   │      │   │                              
  │   │      │   │                              
  └───┘      └───┘                              
If Feds call you and say something bad on me, it may prove what I said are truth, they are afraid of it.

0/0
 Reply   Quote More 

 From:  ANT_THOMAS   
 To:  Matt     
40466.40 In reply to 40466.20 
A MySQL question.

Due to there being missing parts on the chart for the shorter readings because of the missing entries I've changed how the data is pulled from the database by calculating the current time minus the length of time required then only fetching the rows that are greater than this calculated time. It works nicely and gives a proper day, week length etc.

My question is should I be indexing my "unixtime" column to make it easier on the DB? 

New code is...

code: 
$currtime = time();
$newlimit = $currtime - $limit;
SELECT * FROM outside WHERE unixtime > $newlimit ORDER BY id DESC
With $limit now being the length of time in seconds.
edit: I think that looks better.

0/0
 Reply   Quote More 

 From:  ANT_THOMAS   
 To:  ALL
40466.41 
I suck at using the new editor.
0/0
 Reply   Quote More 

 From:  Matt  
 To:  ANT_THOMAS      
40466.42 In reply to 40466.40 
Yes, an index would be useful there.

doohicky

0/0
 Reply   Quote More 

 From:  af (CAER)  
 To:  ANT_THOMAS      
40466.43 In reply to 40466.41 
The editor sucks at being used, more like.
0/0
 Reply   Quote More 

 From:  ANT_THOMAS   
 To:  Matt     
40466.44 In reply to 40466.42 
Is it a cache issue that is causing no grey box to appear when I want to add code in the new editor? Only "code:" appears I end up having to go in to the HTML and put things between the pre tags but there's divs all over the place.
0/0
 Reply   Quote More 

 From:  Matt  
 To:  ANT_THOMAS      
40466.45 In reply to 40466.44 
Could be a cache issue, it's showing here on both "Teh Forum" and "Yellow" themes.

doohicky

0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  ALL
40466.46 
Another slightly irrelevant cool thing: http://ankane.github.io/chartkick/
0/0
 Reply   Quote More 

 From:  Isa (IZA_MUSED)  
 To:  ANT_THOMAS      
40466.47 In reply to 40466.1 
Ant- What a cool/interesting thing to do.
Is your questioned answered?  I imagine so by now, but don't have time to read.
0/0
 Reply   Quote More 

Reply to All    
 

1–20  21–40  41–47

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats