Comments (4)
Hi @jakubmisek, do you know if it's possible to mimic Zend's PDO behavaiour, ie. to allow the PDO driver to accept string parameters for querying integer and numeric fields?
from peachpie.
Hi @jakubmisek, any chance to take a look at this problem?
IMO this is a design problem that we should address the sooner the better.
How have you dealt with this problem with the other DB backends?
Key here is "most of the time we will fetch values and use them as parameters in subsequent queries".
from peachpie.
@kripper thank you for reporting the issue. I'd need a test case to try that;
from peachpie.
Hi, the problem was that PeachPie's PDO doesn't support providing a string with an integer ("123"
) as a nummeric argument (i.e. an argument that is expected to be a number, like in SELECT 1 = ?
), while Zend supports it.
But on the other hand, Zend's PDO doesn't support providing a float (123.456
) nor a string containing a float ("123.456"
) as a nummeric argument. This is really frustrating, since it forces to rewrite SQL sentences to include CASTs.
Since Zend is broken for floats, I'm not sure if it is worth fixing this problem only for integers...unless we accept to fix both cases in PeachPie even when it probably won't be fixed on Zend.
Closing for now.
from peachpie.
Related Issues (20)
- Help with solving the problem with the magic __get and __set HOT 2
- ioncube loader HOT 1
- Magic methods not working as expected HOT 4
- PeachPie 1.0.* Status HOT 1
- Peachpie crypt behavior HOT 1
- some syntax error HOT 4
- strange compiler behavior when modifier is "protected" HOT 1
- program execution time HOT 3
- virtual and override HOT 1
- property, variable and PhpValue HOT 4
- Strange behavior when instantiating a class in an anonymous function HOT 4
- Problems when compiling a project using Avalonia UI. Help is needed HOT 6
- can not work woth tinyfilemanager
- Home Page Show Not Found HOT 1
- Change Sdk version to 1.1.5 make error when running HOT 3
- when php google/protobuf is used, generated binary php file cause exception after compiled to dll
- Directly render Blazor component on PHP page (ASP.NET Core 8) HOT 2
- Peachpie.Runtime uses outdated System.Data.SqlClient 4.6.0 HOT 4
- Special characters cannot be recognized HOT 2
- PHP4034: Failure writing debug information: Value cannot be null. (Parameter 'type') HOT 2
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 peachpie.