Is there a function that would replace the spaces in a string? Like concat but only one row.
For example: "I am a machine" would become "I,am,a,machine".
Thanks!
function
Moderator: General Moderators
Re: function
$result = str_replace(" ", ",", $yourText);
Re: function
Thanks, but I wanted to do this in the query and not in PHP.
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: function
MySql String Functions
[sql]SELECT REPLACE("I am a machine", ' ', ',');[/sql]
Use Google. I found this by entering the following query - mysql string replace
[sql]SELECT REPLACE("I am a machine", ' ', ',');[/sql]
Use Google. I found this by entering the following query - mysql string replace