Donovan Posted December 14, 2007 Share Posted December 14, 2007 Somebody offered up this code to help me trim a " from a Last_Name field. It is not working. $stripname = $db->sql_query("UPDATE ".$prefix."$table_name SET Name_Last = TRIM(LEADING '\"' FROM 'Name_Last'"); I also tried a ltrim but could not get that working either. The field looks like this. "ABRAHAM "BAXTER "COOPER The Name_First looks like this COREY " ROBYN A" NICHOL W" Yes you can imagine what the field looked like from the csv file "COOPER, ROBYN A" I split it on the comma during the import FIELDS TERMINATED BY ',' But now I can't get the " stripped off the name fields. Any help is appreciated. Link to comment https://forums.phpfreaks.com/topic/81717-trim-leading-from-varchar-field/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.