Re: Array and insert statement throws error
| From: | Stuart Felenstein | Date: | Fri, 15 Oct 2004 20:40:40 +0000 |
| Subject: | Re: Array and insert statement throws error | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-36835@lists.php.net to get a copy of this message | ||
Yep, I had found it shortly before.
Only it's not looping. It is taking last value only.
Stuart
--- "Matt M." <h.dudeness@gmail.com> wrote:
> if ( is_array( $_SESSION['l_industry'] ) ) {
> foreach ( $_SESSION['l_industry'] as $p ) {
> $query = "INSERT INTO Profiles_Industries
> (ProfileID,IndID) VALUES
> ($LID, $p)";
> } //foreach ( $_SESSION['l_industry'] as $p )
> } //if ( is_array( $_SESSION['l_industry'] ) )
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>