Comments (6)
What's the result of the regular PDOOCI implementation?
from pdooci.
It work's fine with the regular PDOOCI implementation. You get a proper int as a result.
from pdooci.
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.
Ok, thank you. I'll try that and provide a test.
from pdooci.
Thanks. :-)
from pdooci.
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:
- parameter
- variable
- optional data type, defaults to PDO::PARAM_STR
- optional lenght, defaults to ... nothing, or null!
oci_bind_by_name expects:
- statement
- name
- variable
- length, defaults to -1
- 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)
- When inserting value with "?" then ":pdooci_m" is inserted instead of "?" HOT 8
- Bind array for sql IN(?) HOT 2
- Class 'PDOStatement' not found HOT 2
- Statement->execute() needs to bind values by reference HOT 3
- Why my code isn't easily translated HOT 1
- Error inserting CLOB value HOT 5
- PHP 5.6 or PHP 7.1 Support? HOT 3
- datatype mismatch PDO vs OCI HOT 7
- Enable dbms_output HOT 1
- Statement->execute() doesn't like bind variables with null values HOT 1
- Can't find way to set prefetch
- Undefined variable: case in file: vendor/taq/pdooci/src/Statement.php on line: 642 HOT 6
- PHP Warning: oci_fetch_all(): ORA-24374:
- ATTR_DEFAULT_FETCH_MODE HOT 1
- ATTR_STRINGIFY_FETCHES
- do not return queryString in PDO::query()!! HOT 6
- the question mark problem
- php 8.1 HOT 9
- \PDO::FETCH_BOTH is only fetched as \OCI_NUM HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdooci.