MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Nicole Lallande Date:March 18 2003 6:16pm
Subject:a conundrum -- php/mysql script
View as plain text  
Dear all,

Have written a wrapper to Christian Novak's excellent biffwriter class 
which writes out excel files based on query to a mysql database.

A for loop, $zz=1; $zz <=61; $zz++:
generates the id needed for the WHERE condition:

   $sql = "SELECT $arv, DATE_FORMAT(date_rec,'%m-%d-%Y') as nice_date 
from arviContacts WHERE fid=$zz";

which is then passed to a function writeARV($sql);
which then loops through the database for all data pertaining to that 
id,  ($numoffields=mysql_num_fields($result);)
opens a file,
writes out the column heads and then
loops through the data and parses into an excel file.  

1.  The counter is being incremented correctly,
2.  all the files are created correctly,
3.  all the column heads are generated correctly
4.  and the data for  4 specific files do NOT get written in.  
5.  The file id numbers are 47,49,51 and 57 (all odd numbers but only 3 
are in sequence)
6.  These files are generated with NO DATA while all the other files are 
generated with the data.  
7.  If I explicity change the counter to one of these numbers and run 
the script singly, then these specific files get generated correctly 
WITH all the data.

I do not even know how to begin to debug this which is why I posted to 
both lists -- any pointers? clues?

TIA,

Nicole

-- 
########################
Nicole Lallande
nicole@stripped
760.753.6766
########################


Thread
a conundrum -- php/mysql scriptNicole Lallande18 Mar