adambinnersley / pdo-dbal Goto Github PK
View Code? Open in Web Editor NEWA simple database abstraction layer using PHP and PDO
License: MIT License
A simple database abstraction layer using PHP and PDO
License: MIT License
I am trying to write a project using pdo-dbal, however when I make more than one query in a call using the MemcacheCache wrapper I am getting persistence in the values
class variable.
See below. The first entry is the first query on the page, the second query is the next. The second query still contains the first query's values
despite not being passed in. The second image shows the second query's dbal call.
I tried changing the first call's synonymous column of id
to lobbyID
thinking it was being cached that way, but this did not fix anything.
I can fix this by making values
public, and setting it to []
just like what \DBAL\Database\executeQuery()
tries to do, but somehow fails in doing so; I can also fix it by clearing values
as the first action in \DBAL\Database\select()
, see below.
I tried removing the unset()
calls, and I tried moving values = []
to right after the bind, but neither of those solved the issue, only clearing values
from outside the class.
If I could get xdebug working I could try to narrow it down further, but I guess that isn't happening.
Can you provide documentation for the following implementation:
Thank you in advance!
Look to support all of the operators avaliable or streamline current system in the where queries. e.g. BETWEEN, NOT BETWEEN, IN, NOT IN, LIKE, NOT LIKE, etc...
Log location is not valid and allow ability to change log location
Hey,
Super cool package - I've enjoyed using it. After upgrading PHP to 7.4 (skipping 7.3) most of my requests now gives the following warning:
Notice: Trying to access array offset on value of type int in /usr/www/users/webinstance/cmp/vendor/adamb/database/src/Database.php on line 560
It does not seem that functionality is affected.
Best,
Albert
Since setLogLocation() is available only after initialization, connection error in constructor falls back to the default log location.
If an error happens and displayErrors is off - execution goes on.
It must stop independently from displayErrors setting.
Can you provide documentation for the following implementation:
SELECT * FROM table_name WHERE field_name IN (values)
I tried using the following but its not working:
$dbInstance->selectAll( 'table_name', [ 'field_name ' => [ 'IN' => [ 'value1', 'value2' ] ] ] );
The returned SQL is:
SELECT * FROM
table_nameWHERE
field_name %s ?;
Which is using the format from the IN operator but not really what I'm looking for.
Should I be using a different call or $where array structure?
Unlike in other methods, writeQueryToLog() is not called.
Short array syntax has been added in 5.4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.