Anonymous | Login | Signup for a new account | 12-17-2024 11:28 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002125 | [Quercus] | minor | always | 10-27-07 01:27 | 08-11-08 15:39 | ||||
Reporter | koreth | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.1.3 | ||||||
Summary | 0002125: Integer from MySQL query disappears on array append operation | ||||||||
Description |
I construct an array of results from a MySQL query: $raw_thread_rows = array(); while ($row = mysql_fetch_assoc($ret)) { $raw_thread_rows[]= $row; } Then, later on, I iterate over that data trying to generate an array of values from one of the columns, and it fails. I add debug information: $thread_ids = array(); foreach ($raw_thread_rows as $r) { error_log("Raw thread row = " . print_r($r, true)); $thread_ids[] = $r['thread_id']; error_log("Thread ID array = " . print_r($thread_ids, true)); } And here's the output I get (or at least the first few iterations of it): Raw thread row = Array ( [user] => 500018751 [thread_id] => 5963202122 [last_update] => 1193435269 [num_unread] => 0 ) Thread ID array = Array ( [0] => ) Raw thread row = Array ( [user] => 500018751 [thread_id] => 5703323014 [last_update] => 1193186680 [num_unread] => 0 ) Thread ID array = Array ( [0] => [1] => ) Raw thread row = Array ( [user] => 500018751 [thread_id] => 5849902182 [last_update] => 1192735312 [num_unread] => 0 ) Thread ID array = Array ( [0] => [1] => [2] => ) |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
35 total queries executed. 29 unique queries executed. |