Re: [PHP] Problems with implode

2009-03-26 Thread Toke Herkild
Tom Worster skrev: On 3/24/09 9:25 AM, Andrea Giammarchi an_...@hotmail.com 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

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', $whatever)).')'

RE: [PHP] Problems with implode

2009-03-26 Thread Andrea Giammarchi
: 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 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

Re: [PHP] Problems with implode

2009-03-25 Thread Toke Herkild
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 problems

Re: [PHP] Problems with implode

2009-03-25 Thread Toke Herkild
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 Giammarchi wrote: Dunno why you guys

Re: [PHP] Problems with implode

2009-03-25 Thread Toke Herkild
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] Problems

Re: [PHP] Problems with implode

2009-03-25 Thread Igor Escobar
Subject: Re: [PHP] Problems with implode 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

Re: [PHP] Problems with implode

2009-03-25 Thread Tom Worster
On 3/24/09 9:25 AM, Andrea Giammarchi an_...@hotmail.com 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

[PHP] Problems with implode

2009-03-24 Thread 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); My problem is that some of the values gets concenated, others

Re: [PHP] Problems with implode

2009-03-24 Thread Tom Worster
On 3/24/09 7:14 AM, Toke Herkild t...@ezl-data.dk 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

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 that some of the

Re: [PHP] Problems with implode

2009-03-24 Thread TG
a problem, but I've never seen any issues with it like you're describing. -TG - Original Message - From: Toke Herkild t...@ezl-data.dk To: php-general@lists.php.net Date: Tue, 24 Mar 2009 12:14:01 +0100 Subject: [PHP] Problems with implode Hi All, I've an array() with approx 1200

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) -- PHP

Re: [PHP] Problems with implode

2009-03-24 Thread Matt Neimeyer
On Tue, Mar 24, 2009 at 9:15 AM, Per Jessen p...@computer.org 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

Re: [PHP] Problems with implode

2009-03-24 Thread Tom Worster
On 3/24/09 8:58 AM, Per Jessen p...@computer.org 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 Andrea Giammarchi
)).')' ... 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-general@lists.php.net Subject: Re: [PHP] Problems with implode On Tue, Mar 24, 2009 at 9:15

Re: [PHP] Problems with implode

2009-03-24 Thread Jan G.B.
2009/3/24 Toke Herkild t...@ezl-data.dk: 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

Re: [PHP] Problems with implode

2009-03-24 Thread Tom Worster
On 3/24/09 9:15 AM, Per Jessen p...@computer.org 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

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 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

Re: [PHP] Problems with implode

2009-03-24 Thread Toke Herkild
Tom Worster skrev: On 3/24/09 9:15 AM, Per Jessen p...@computer.org 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

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: Dunno why you guys started