otd Posted July 18, 2008 Share Posted July 18, 2008 Good Afternoon Folks, After a bit of help with a SQL query, i need to run a query in Mysql. i have a table with approx 450 records and in a particular column for every record i have some text followed by <script blah blah etc... and i need to run a query to delete everything including and after the <script. Can anyone help me on the command i would need. Thank you for any help received in advance. Many Thanks Link to comment https://forums.phpfreaks.com/topic/115427-solved-mysql-command-query/ Share on other sites More sharing options...
otd Posted July 18, 2008 Author Share Posted July 18, 2008 i have managed to sort this now, ive anyone wanted to knw the answer - UPDATE yourtable SET yourcolumn = SUBSTRING(yourcolumn FROM 1 FOR POSITION('<script' IN yourcolumn) - 1) Link to comment https://forums.phpfreaks.com/topic/115427-solved-mysql-command-query/#findComment-593389 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.