CodingPHP MySQL Charts/Graphs

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 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