Giter Club home page Giter Club logo

Comments (6)

taq avatar taq commented on May 27, 2024

What's the result of the regular PDOOCI implementation?

from pdooci.

gcollombet avatar gcollombet commented on May 27, 2024

It work's fine with the regular PDOOCI implementation. You get a proper int as a result.

from pdooci.

taq avatar taq commented on May 27, 2024

Could you please change, on Statement.php:

\oci_bind_by_name($this->_stmt, $param, $value);

to

\oci_bind_by_name($this->_stmt, $param, $value, $leng, $type);

and see if it works? Or provide a test to check the desired behaviour?

from pdooci.

gcollombet avatar gcollombet commented on May 27, 2024

Ok, thank you. I'll try that and provide a test.

from pdooci.

taq avatar taq commented on May 27, 2024

Thanks. :-)

from pdooci.

taq avatar taq commented on May 27, 2024

We really need to run tests. I just made the change I told above and everything broke. We really need to send the default expected values, so:

bindParam expects:

  1. parameter
  2. variable
  3. optional data type, defaults to PDO::PARAM_STR
  4. optional lenght, defaults to ... nothing, or null!

oci_bind_by_name expects:

  1. statement
  2. name
  3. variable
  4. length, defaults to -1
  5. type, defaults to SQLT_CHR

Then I changed again the code sending PDO::PARAM_STR and -1 as default values, and it broke again. Then I created an if checking if length and type were not null (need both because the last optional on bindParam is length, so type would be filled even with null), if so, they are send to oci_bind_by_name (on inverse order, duh!), and seems it worked on the way that didn't broke tests and previous behaviours. I'll commit on the next minutes so you can test if it worked.

from pdooci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.