Re: [PHP-DB] foreach problem

2003-02-07 Thread Jason Wong
On Saturday 08 February 2003 06:16, Sam Folk-Williams wrote: > I don't get any MySQL error... It adds the first entry_id and date exactly > as it should... it seems to be acting like entry_date is not an array, but > when I use the same foreach loop to echo the contents of entry_date it > echoes th

Re: [PHP-DB] foreach problem

2003-02-07 Thread Sam Folk-Williams
I don't get any MySQL error... It adds the first entry_id and date exactly as it should... it seems to be acting like entry_date is not an array, but when I use the same foreach loop to echo the contents of entry_date it echoes the multiple values (2003-05-01, 2003-05-02, etc)... I use the same cod

Re: [PHP-DB] foreach problem

2003-02-07 Thread Jason Wong
On Friday 07 February 2003 11:22, Sam Folk-Williams wrote: > Hi, > > I can't figure out why this won't work: > > foreach($event_date as $val) { > > $sql2 = "INSERT INTO cal_date_map (entry_id, date) VALUES (\"$entry_id\", > \"$val\")"; > $result = @mysql_query($sql2,$connection) or die > ("Problem

[PHP-DB] foreach problem

2003-02-07 Thread Sam Folk-Williams
Hi, I can't figure out why this won't work: foreach($event_date as $val) { $sql2 = "INSERT INTO cal_date_map (entry_id, date) VALUES (\"$entry_id\", \"$val\")"; $result = @mysql_query($sql2,$connection) or die ("Problem executing foreach database query."); } $event_date is an array with sever