Menu

#1 Prepared Statements & Escaping

open
None
5
2005-03-16
2005-03-16
Anonymous
No

Hi,

I was wondering if the following 2 items are planned on
being added to the API
1. prepared statements
2. escaping of values for a query (if this is done
somewhere, and I can't find it, could you please
describe it in the documentation?)

Providing a valid email address per the instructions...
jpellico [at] gmail.com

Discussion

  • Jonathan Wakely

    Jonathan Wakely - 2005-03-16

    Logged In: YES
    user_id=426241

    1. I have no plans for this at the moment, simply because I
    don't have the time to write it.

    2. FieldType::sql(const std::string& val) will escape val if
    it decides the data needs escaping, which is true for string
    field-types. It also adds quotes.

    The escaping could/should be broken out into a separate
    function that users can call.

     
  • Jonathan Wakely

    Jonathan Wakely - 2005-03-16
    • assigned_to: nobody --> redi
     
  • Jonathan Wakely

    Jonathan Wakely - 2005-09-03

    Logged In: YES
    user_id=426241

    I've just checked in a function to escape a string, into
    string_utils.h

    std::string mysqlcppapi::escape(const std::string&)

     
  • Jonathan Wakely

    Jonathan Wakely - 2005-09-03

    Logged In: YES
    user_id=426241

    Forgot to say, the new function will be in 2.0.0 (but isn't
    in the current 2.0.0RC1 package)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.