Filling blanks on SELECT

2006-12-28 Thread Ashley M. Kirchner
Thanks to Chris yesterday, I managed to figure some things out by myself. Now I'm faced with another problem. Given the same database again: ++---+--+-+---++ | Field | Type | Null | Key |

Re: Filling blanks on SELECT

2006-12-28 Thread Chris White
Ashley M. Kirchner wrote: ?php while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $mins[] = $row['the_minute']; $temp_f[] = $row['avg_temp_f']; $temp_c[] = $row['avg_temp_c']; } ? I'd try php here, something like: ?php while($row =

Re: [MySQL] Re: Filling blanks on SELECT

2006-12-28 Thread Ashley M. Kirchner
Chris White wrote: I'd try php here, something like: Problem is, PHP doesn't know which record is blank. I select for 60 records and MySQL returns 55. How is PHP supposed to know which 5 are blank? -- W | It's not a bug - it's an undocumented feature.

Re: [MySQL] Re: Filling blanks on SELECT

2006-12-28 Thread Dan Nelson
In the last episode (Dec 28), Ashley M. Kirchner said: Chris White wrote: I'd try php here, something like: Problem is, PHP doesn't know which record is blank. I select for 60 records and MySQL returns 55. How is PHP supposed to know which 5 are blank? Mysql doesn't know either. All

Re: [MySQL] Re: Filling blanks on SELECT

2006-12-28 Thread Ashley M. Kirchner
Dan Nelson wrote: If not, you'll probably have to read the records and store them in an array indexed by minute. Then when you're done reading from mysql, walk the array from 0 to 59 and write out each element. That way you're guaranteed 60 output rows. Eh, did something different. Now