![]() |
mySQL - trim leading / trailing blank space from POST table's "pagetext" column
I've been trying to run a mySQL query to trim leading and trailing blank spaces in the pagetext column of the posts table in order to clean up the presentation of the post data. I've been testing the following query on a single post:
UPDATE `post` SET `pagetext` = TRIM(pagetext) WHERE postid = '427517'; I don't see anything wrong with the query. However, it nukes the entire line of data for any specific post. Does anyone know what I'm doing wrong? Thanks. -- Rik |
Try:
Code:
UPDATE post SET pagetext = TRIM(BOTH ' ' FROM pagetext) WHERE postid = 1; |
Quote:
That worked perfectly. Cleaned up thousands of pages in just a minute. Thanks a lot! -- Rik |
All times are GMT. The time now is 06:39 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|