Re: [PHP-DB] Populating an array from mysql db

2003-08-28 Thread jeffrey_n_Dyke
I'd worry about the empty dates after. and use something like. $qry = select date1, date2 from table; $result = mysql_query($qry) or die(mysql_error()); while ($rs = mysql_fetch_row($result)) { //this array could be built a number of ways, one is $bookdate[] = array($rs[0],$rs[1]); } if

Re: [PHP-DB] Populating an array from mysql db

2003-08-28 Thread CPT John W. Holmes
From: mike karthauser [EMAIL PROTECTED] I have a course booking system that allows the client to add courses and then specify how long they run for. The admin system I have built allows the client to add up to 30 dates for each instance of the course and these are adding to a database row in

Re: [PHP-DB] Populating an array from mysql db

2003-08-28 Thread mike karthauser
on 28/8/03 1:09 pm, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: I'd worry about the empty dates after. and use something like. $qry = select date1, date2 from table; $result = mysql_query($qry) or die(mysql_error()); while ($rs = mysql_fetch_row($result)) { //this array could be built

Re: [PHP-DB] Populating an array from mysql db

2003-08-28 Thread CPT John W. Holmes
From: mike karthauser [EMAIL PROTECTED] Thanks for this - I ended up rehashing my query to this: ? $result = mysql_query(SELECT * FROM dates WHERE bookcode = '$bookcode' ORDER BY date1,$db); // loop to populate array $myrow = mysql_fetch_array($result); $i = 1; while ($i = '30') {

Re: [PHP-DB] Populating an array from mysql db

2003-08-28 Thread mike karthauser
on 28/8/03 5:00 pm, CPT John W. Holmes at [EMAIL PROTECTED] wrote: Thanks for this - I ended up rehashing my query to this: ? $result = mysql_query(SELECT * FROM dates WHERE bookcode = '$bookcode' ORDER BY date1,$db); // loop to populate array $myrow = mysql_fetch_array($result);

RE: [PHP-DB] Populating an array from mysql db

2003-08-28 Thread Ford, Mike [LSS]
On 28 August 2003 17:25, mike karthauser wrote: on 28/8/03 5:00 pm, CPT John W. Holmes at [EMAIL PROTECTED] wrote: Thanks for this - I ended up rehashing my query to this: ? $result = mysql_query(SELECT * FROM dates WHERE bookcode = '$bookcode' ORDER BY date1,$db);