Discussions
Categories
Groups
Advertisement
Child Item
Home
Topics
Technology & Internet
Software & Web Development
Design
php mysql question
ChicoMendez
hi i have a large db and when i export it i get
INSERT INTO `places` VALUES (294, 'ae', 'badiya', 'Badiya', '04', '25.4313889', '56.3483333\n', 0, '');
anyone know how to get rid of the \n you see above - considering i have 2.5 mil rows on that table?
tnx
Find more posts tagged with
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
Advertisement
Advertisement
Comments
seamus
You could use the replace() function to remove all of the trailing \n's.
I'd say test it before doing anything with it. Compare the below queries;
SELECT myCol FROM places LIMIT 0, 50
SELECT REPLACE(myCol, '\n', '') FROM places LIMIT 0, 50
The first should give you the raw data, the second should give you the same data, just with the newline characters removed.
I'm also not sure if MySQL recognises the \n as a newlines character. Try
SELECT RTRIM(myCol) from Places LIMIT 0, 50
And see what it shows you.