clankill3r Posted December 23, 2011 Share Posted December 23, 2011 I have a table with words, what is a correct query to trim all words? this is wrong: $query = "UPDATE negative_words TRIM word"; it's structured like id - word - rating and negative_words is the tabel name. Quote Link to comment Share on other sites More sharing options...
ignace Posted December 23, 2011 Share Posted December 23, 2011 UPDATE negative_words SET word = TRIM(word); Quote Link to comment Share on other sites More sharing options...
clankill3r Posted December 23, 2011 Author Share Posted December 23, 2011 dankjewel / thanks Quote Link to comment Share on other sites More sharing options...
Maq Posted December 23, 2011 Share Posted December 23, 2011 FWIW, there is also: LTRIM() for removing leading spaces. RTRIM() for removing trailing spaces. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.