My table structure in the database;
Table “System_t”
id | Owner | System
===========================================
1 | Joe | Registration
| | Event //contains new line
| | Aims
-------------------------------------------
2 | Rose | Ticket
| | Elearning
NOTE : The data field “System” were saved from a Textarea box.
My problem is how am I going to delete only the “Event” data from the field “System”?
My table should be look like this when it is deleted;
id | Owner | System
===========================================
1 | Joe | Registration
| | Aims
-------------------------------------------
2 | Rose | Ticket
| | Elearning
Any idea how to do it without changing the table structure?
An
UPDATEstatement with aREPLACEshould be better in this case.Look at this post, it might help you understand what I’m talking about :
Deleting part of a string in MYSQL