Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts

    db insert with special chars.

    I am inserting the following value to my db.

    Code:
    Coconut Crème Brûlée
    When I want to delete it via a script (as opposed to using phpMyAdmin etc), the script displays it as 'Crème Brûlée' (without the single quotes). as a result, it cannot match what is in the db and so wil not delete it.

    which is better:

    1. make sure it is inputted to the db as it is and make my script match with that for deletion
    or
    2. keep my script as is and make the value in the db be in readable format.

    If db value should be readable, please give me a shove as to how to do that, without an extra step such as a proffing page.

    The script works correctly in all other ways. only with these types of character do I have difficulties.

    bazz
    Last edited by bazz; 09-02-2009 at 01:44 AM.
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #2
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    Further on this and I have found a gap in my knowledge.

    the $Path string shows the value as Crème Brûlée. However, when I print it out i.e. print qq( path=$Path);

    it shows this on my page Crème Brûlée

    if I use my $dish = $cgi->param('dish_name'); it gives me Crème Brûlée

    Why does $Path print out as jumble?

    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #3
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    OK, after numerous searches before knowing what I needed to search for , I have the function problem resolved with

    Code:
    use HTML::Entities;
    But I still haven't worked out why the value in the PATH_INFO is fine until I print qq( $Path ); it still outputs gobbeldeegook.

    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •