Filling Multidimensional Array from MySQL
Posted: Thu Nov 03, 2005 3:03 pm
Thanks for all your help so far! My project is actually progressing. If you've followed my mini-saga, I figured out that if I store my data in arrays, I can access it while the table is being created. I just don't know how to use a multidimensional array very well, but I'm thinking that is what I need for this project.
What I have is data in a database of this nature:
tblEvents:
event_title:text
start_date:date/time
end_date:date/time
confirmed:integer
What I need to create is an array that will store the information this way
The value field is calculated using a for loop on the start date & end date and populating all Julian date counts in-between. My question is, how do I store these three fields in a multidimensional array, and how do I recall them later? I've found numerous sites with info on how to insert into a database (if user keys data in), but can't seem to find how to assign the array values through PHP as it goes through the recordset.
Any help is greatly appreciated!
What I have is data in a database of this nature:
tblEvents:
event_title:text
start_date:date/time
end_date:date/time
confirmed:integer
What I need to create is an array that will store the information this way
Code: Select all
title value (julian day count) confirmed
event1 2454980 -1The value field is calculated using a for loop on the start date & end date and populating all Julian date counts in-between. My question is, how do I store these three fields in a multidimensional array, and how do I recall them later? I've found numerous sites with info on how to insert into a database (if user keys data in), but can't seem to find how to assign the array values through PHP as it goes through the recordset.
Any help is greatly appreciated!