FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » function for preserving special characters?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: function for preserving special characters? [message #186106 is a reply to message #186104] Sat, 14 June 2014 00:51 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 6/13/2014 8:45 PM, Richard Damon wrote:
> On 6/13/14, 12:57 AM, richard wrote:
>> When attempting to transfer records from one table to another, certain
>> records refuse to be.
>> Such as those with words like "I'm".
>> What's even more confusing is, "It's" won't work, but "Cathy's" is ok?
>>
>> I know there is a procedure in PHP for dealing with this.
>> I just can't find it right now.
>> Can anyone help on this?
>>
>
> There are several ways to do this.
>
> The first, is to use "Prepared Statements" to write to the database.
> When you do this, you build of the command to perform independent of the
> data to process (with place holders), and then connect this to the data
> when you execute the prepared statement.
>
> The other option is to use something like mysqli_real_escape_string()
> function or mysqli::real_escape_string() (there is also
> mysql_real_escaple_string() if you are still using the obsolete mysql
> routines). You could also do this with a str_replace, but you need to
> determine all the cases that need to be escaped (this isn't as simple as
> it might first seem, as the manual implies that this may depend on the
> character set selected.
>

Richard,

We've told RTS (Richard the Stupid) this many times but he never learns.
Then he comes back and insults people who try to help him.

That's the reason the regulars in this newsgroup aren't telling him.
We're tired of him arguing (like he is with me earlier in this thread -
and he's ALWAYS wrong) and insulting the rest of us.

And of course he NEVER apologizes.

Just search this newsgroup for RTS and look at some of the threads.
You'll get an eyeful.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Oracle Wallet and PHP issue.
Next Topic: What is the purpose of "&" in this code?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon May 27 16:24:02 GMT 2024

Total time taken to generate the page: 0.04782 seconds