Re: [PHP] remove last comma in string

2006-06-09 Thread Richard Lynch
You're missing an = for the city. substr() should have worked. rtrim() won't work, as ',' is not whitespace. On Thu, June 8, 2006 7:58 pm, weetat wrote: Hi all, I am using php 4.3.2 and mysql , linux. I have a sql statement below : UPDATE tbl_chassis_temp SET country =

Re: [PHP] remove last comma in string

2006-06-09 Thread Paul Novitski
weetat wrote: I have a sql statement below : UPDATE tbl_chassis_temp SET country = 'Singapore', city 'SINGAPORE', building = 'Tampines Central 6', other = 'Level 03-40', I need to remove the last comma from sql text above. I have tried using substr and rtrim , without any success ?

Re: [PHP] remove last comma in string

2006-06-09 Thread Richard Lynch
On Fri, June 9, 2006 5:17 pm, Paul Novitski wrote: rtrim() won't work, as ',' is not whitespace. Richard, you're wrong -- read the manual. All three functions trim(), ltrim(), and rtrim() allow you to append an optional list of characters to be trimmed: http://php.net/trim

[PHP] remove last comma in string

2006-06-08 Thread weetat
Hi all, I am using php 4.3.2 and mysql , linux. I have a sql statement below : UPDATE tbl_chassis_temp SET country = 'Singapore', city 'SINGAPORE', building = 'Tampines Central 6', other = 'Level 03-40', I need to remove the last comma from sql text above. I have tried using

Re: [PHP] remove last comma in string

2006-06-08 Thread D. Dante Lorenso
weetat wrote: Hi all, I am using php 4.3.2 and mysql , linux. I have a sql statement below : UPDATE tbl_chassis_temp SET country = 'Singapore', city 'SINGAPORE', building = 'Tampines Central 6', other = 'Level 03-40', I need to remove the last comma from sql text above. I have

Re: [PHP] remove last comma in string

2006-06-08 Thread Chris
weetat wrote: Hi all, I am using php 4.3.2 and mysql , linux. I have a sql statement below : UPDATE tbl_chassis_temp SET country = 'Singapore', city 'SINGAPORE', building = 'Tampines Central 6', other = 'Level 03-40', I need to remove the last comma from sql text above. I have