foreach problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 several dates separated by commas. (2003-10-02,
2003-10-03). The code above successfuly inserts the first dae in the array,
but none of the others... am I missing something?

Thank you.

Sam



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux