MySQL Injection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • miguel22
    New Member
    • Jan 2008
    • 13

    MySQL Injection

    What is the best and easy way to prevent MySQL Injections?

    Thank you.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Google does a wonderful job for that.

    Comment

    • miguel22
      New Member
      • Jan 2008
      • 13

      #3
      Sorry, I thought you guys knew it. I will go with the real professional ... Google.

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by miguel22
        Sorry, I thought you guys knew it. I will go with the real professional ... Google.
        I could have told you to use mysql_real_esca pe_string but then again best is relative and Google should have all the options where you can then take your pick.

        Comment

        • Atli
          Recognized Expert Expert
          • Nov 2006
          • 5062

          #5
          Best is relative to what kind of data you are expecting.
          The mysql_real_esca pe_string function will work most of the time, but in some cases a simple regex check will do better. In other cases simply checking whether a variable is of a specific type is enough.

          Comment

          Working...