Re: implode()
| From: | Jason Wong | Date: | Tue, 26 Nov 2002 18:50:33 +0000 |
| Subject: | Re: implode() | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126146@lists.php.net to get a copy of this message | ||
On Wednesday 27 November 2002 02:19, Jef wrote:
> > implode() expects an array as the second argument. You're passing a
>
> string. In
>
> > fact with the code you have above I don't see why you don't just tack the
> > comma on the end in the first place:
> >
> > if($image11_name != '') $sqlUpdate .=
> > "image11='$image11_name', ";
>
> The reason being the comma at the end of the SQL command will prevent the
> command from working because SQL will expect another entry. However, your
> comment about implode expecting an array helps out. Thanks.
Yes, but as you're building up the SQL statement manually you just leave out
the comma off the last line!
Using implode() is appropriate if you're programatically (sp?) building an SQL
statement using an array.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
What I need is a MATURE RELATIONSHIP with a FLOPPY DISK ...
*/