I want to delete a part of the substring from my table's column
For example, I have a structure like the following:
id | Col1
____________________________________________________________
1 | The string I want and the string I don't
And I need to update my table such that:
id | Col1
____________________________________________________________
1 | The string I want
I tried using the following code:
$var = "UPDATE mytable
SET col1 = replace(col1,col1(SUBSTRING(col1,19),'')";
But this won't work!