In mysql database how to give data with apostrophe

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shiva05
    New Member
    • Apr 2008
    • 5

    In mysql database how to give data with apostrophe

    Hi frnds,
    In mysql database how to give data with apostrophe for eg. (i want a data like aurovilan's to be inserted).
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Try to use \' ----------- A single quote (“'”) character.

    Comment

    • ronverdonk
      Recognized Expert Specialist
      • Jul 2006
      • 4259

      #3
      Originally posted by shiva05
      Hi frnds,
      In mysql database how to give data with apostrophe for eg. (i want a data like aurovilan's to be inserted).
      If you insert your data via PHP, use the addslashes() function before you insert and use the stripslashes() function after you selected.

      Ronald

      Comment

      • mwasif
        Recognized Expert Contributor
        • Jul 2006
        • 802

        #4
        Originally posted by ronverdonk
        If you insert your data via PHP, use the addslashes() function before you insert and use the stripslashes() function after you selected.

        Ronald
        AFAIK, there is no need to apply stripslashes() after selecting data from database.

        Comment

        Working...