RE: [PHP] Problems with implode

2009-03-26 Thread Andrea Giammarchi
string', $whatever)).'")'Regards > Date: Thu, 26 Mar 2009 21:01:03 +0800 > From: virgilio.quila...@gmail.com > To: t...@ezl-data.dk > CC: php-general@lists.php.net > Subject: Re: [PHP] Problems with implode > > >>> Dunno why you guys started talk ab

Re: [PHP] Problems with implode

2009-03-26 Thread Virgilio Quilario
>>> Dunno why you guys started talk about utf-8 problems, he has a list of >>> ids >>> which should contain only unsigned integers, otherwise I do not get how >>> that >>> query could work with an implode(',', $whatever) rather than 'id in >>> ("'.implode('","', array_map('mysql_real_escape_string'

Re: [PHP] Problems with implode

2009-03-26 Thread Toke Herkild
Tom Worster skrev: On 3/24/09 9:25 AM, "Andrea Giammarchi" wrote: Dunno why you guys started talk about utf-8 problems, he has a list of ids which should contain only unsigned integers, otherwise I do not get how that query could work with an implode(',', $whatever) rather than 'id in ("'.impl

Re: [PHP] Problems with implode

2009-03-25 Thread Tom Worster
On 3/24/09 9:25 AM, "Andrea Giammarchi" wrote: > > Dunno why you guys started talk about utf-8 problems, he has a list of ids > which should contain only unsigned integers, otherwise I do not get how that > query could work with an implode(',', $whatever) rather than 'id in > ("'.implode('","',

Re: [PHP] Problems with implode

2009-03-25 Thread Igor Escobar
th a numeric array: >> $list = array(12300..12800); and see what happens. >> >> regards, >> Toke >> >> Andrea Giammarchi skrev: >> >>> What about MySQL max_allowed_packet setting? is it bigger than produced >>> string? >>> &g

Re: [PHP] Problems with implode

2009-03-25 Thread Toke Herkild
meric array: $list = array(12300..12800); and see what happens. regards, Toke Andrea Giammarchi skrev: What about MySQL max_allowed_packet setting? is it bigger than produced string? To: php-general@lists.php.net Date: Tue, 24 Mar 2009 15:23:20 +0100 From: t...@ezl-data.dk Subject: Re: [PHP] Pro

Re: [PHP] Problems with implode

2009-03-25 Thread Toke Herkild
t happens. regards, Toke Andrea Giammarchi skrev: What about MySQL max_allowed_packet setting? is it bigger than produced string? To: php-general@lists.php.net Date: Tue, 24 Mar 2009 15:23:20 +0100 From: t...@ezl-data.dk Subject: Re: [PHP] Problems with implode Per Jessen skrev: Andrea Giamm

Re: [PHP] Problems with implode

2009-03-25 Thread Toke Herkild
MySQL max_allowed_packet setting? is it bigger than produced string? To: php-general@lists.php.net Date: Tue, 24 Mar 2009 15:23:20 +0100 From: t...@ezl-data.dk Subject: Re: [PHP] Problems with implode Per Jessen skrev: Andrea Giammarchi wrote: Dunno why you guys started talk about utf-8 pro

RE: [PHP] Problems with implode

2009-03-24 Thread Andrea Giammarchi
What about MySQL max_allowed_packet setting? is it bigger than produced string? > To: php-general@lists.php.net > Date: Tue, 24 Mar 2009 15:23:20 +0100 > From: t...@ezl-data.dk > Subject: Re: [PHP] Problems with implode > > Per Jessen skrev: > > Andrea Giammarchi wrote:

Re: [PHP] Problems with implode

2009-03-24 Thread Toke Herkild
Tom Worster skrev: On 3/24/09 9:15 AM, "Per Jessen" wrote: TG wrote: I don't think that would be a problem, the size of the array. I've used implode at least once or twice on fairly large arrays. More likely is something weird with your data. Yeah, like the odd backspace or carriage retur

Re: [PHP] Problems with implode

2009-03-24 Thread Toke Herkild
Per Jessen skrev: Andrea Giammarchi wrote: Dunno why you guys started talk about utf-8 problems, he has a list of ids which should contain only unsigned integers, otherwise I do not get how that query could work with an implode(',', $whatever) Very good point - maybe the OP has not yet teste

RE: [PHP] Problems with implode

2009-03-24 Thread Per Jessen
Andrea Giammarchi wrote: > Dunno why you guys started talk about utf-8 problems, he has a list of > ids which should contain only unsigned integers, otherwise I do not > get how that query could work with an implode(',', $whatever) Very good point - maybe the OP has not yet tested his code that

Re: [PHP] Problems with implode

2009-03-24 Thread Tom Worster
On 3/24/09 9:15 AM, "Per Jessen" wrote: > TG wrote: > >> I don't think that would be a problem, the size of the array. I've >> used implode at least once or twice on fairly large arrays. More >> likely is something weird with your data. > > Yeah, like the odd backspace or carriage return perh

Re: [PHP] Problems with implode

2009-03-24 Thread Jan G.B.
2009/3/24 Toke Herkild : > Hi All, > > I've an array() with approx 1200 items (list of id-mappings) that part works > fine. > > Now I want to add this list to a query: > $where = "id in (".$idList.")"; > > To accomplish that i do an implode: > $idList = implode(',', $TidList); Are all of the Ids

RE: [PHP] Problems with implode

2009-03-24 Thread Andrea Giammarchi
ray_map('mysql_real_escape_string', $whatever)).'")' ... so, the problem could be more about missed ids in the array obtaining ,, ... so, in this case, array_filter before, no? Regards > Date: Tue, 24 Mar 2009 09:19:53 -0400 > From: m...@neimeyer.org > To: php-gener

Re: [PHP] Problems with implode

2009-03-24 Thread Tom Worster
On 3/24/09 8:58 AM, "Per Jessen" wrote: > I can't reproduce that behaviour - I tried with ascii ('klop') and utf8 > ('Köhler') text. neither can i. if the mail systems don't screw it up, here's my test strings: $strs = array( 'Iñtërnâtiônàlizætiøn', 'החמאס: רוצים להשלים את

Re: [PHP] Problems with implode

2009-03-24 Thread Matt Neimeyer
On Tue, Mar 24, 2009 at 9:15 AM, Per Jessen wrote: > TG wrote: > >> I don't think that would be a problem, the size of the array.  I've >> used implode at least once or twice on fairly large arrays.  More >> likely is something weird with your data. > > Yeah, like the odd backspace or carriage ret

Re: [PHP] Problems with implode

2009-03-24 Thread Per Jessen
TG wrote: > I don't think that would be a problem, the size of the array. I've > used implode at least once or twice on fairly large arrays. More > likely is something weird with your data. Yeah, like the odd backspace or carriage return perhaps. /Per -- Per Jessen, Zürich (3.0°C) -- PH

Re: [PHP] Problems with implode

2009-03-24 Thread TG
I don't think that would be a problem, the size of the array. I've used implode at least once or twice on fairly large arrays. More likely is something weird with your data. I'd do a print_r or var_dump to check the data and make sure that's not the issue. Not saying implode isn't having a

Re: [PHP] Problems with implode

2009-03-24 Thread Per Jessen
Toke Herkild wrote: > Hi All, > > I've an array() with approx 1200 items (list of id-mappings) that part > works fine. > > Now I want to add this list to a query: > $where = "id in (".$idList.")"; > > To accomplish that i do an implode: > $idList = implode(',', $TidList); > > My problem is tha

Re: [PHP] Problems with implode

2009-03-24 Thread Tom Worster
On 3/24/09 7:14 AM, "Toke Herkild" wrote: > I've an array() with approx 1200 items (list of id-mappings) that part > works fine. > > Now I want to add this list to a query: > $where = "id in (".$idList.")"; > > To accomplish that i do an implode: > $idList = implode(',', $TidList); > > My prob