str_replace does not work inside query - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: str_replace does not work inside query (/showthread.php?tid=61073) |
str_replace does not work inside query - El Forum - 09-11-2014 [eluser]thefatladysingsopera[/eluser] I am trying to replace some text that appears on a message like this Code: $combined_message = $t_message . ' ' . $t_signature; When i output Code: $new_message What could be the reason for Code: $new_message str_replace does not work inside query - El Forum - 09-12-2014 [eluser]Tim Brownlaw[/eluser] Code: /** Well here's the thing... Can you tell me that these two insert statements actually work? I don't know how you can tell that your $new_message is not working! What is the SQL generated in both cases? Does it look right? Can you take those generated SQL Statements and use them in say phpmyadmin and test them out? You seriously need to read up on how to perform inserts and the like. str_replace does not work inside query - El Forum - 09-12-2014 [eluser]thefatladysingsopera[/eluser] The two inserts actually work.The problem is i am copying rows from one table to another if you look carefully so the problem is not really me not knowing how insert works. str_replace does not work inside query - El Forum - 09-12-2014 [eluser]Tim Brownlaw[/eluser] Ok I did a search on your Inserts and yes, that syntax is apparently correct! So my apologies on that issue. I'll stick to one point each reply as you didn't take the time to answer the other questions. What do you get when you change... Code: Insert Into Outgoing Table Code: $sql = "INSERT INTO outgoing_sms ( |