mattbit / mysql-compat Goto Github PK
View Code? Open in Web Editor NEWBackward compatibility for old mysql_* functions
License: MIT License
Backward compatibility for old mysql_* functions
License: MIT License
can you put this into one file, like this?
https://gist.github.com/rubo77/1db052edd8d723b59c79790b42635f1e
And maybe add an install instriuctions in the README would be nice
As reported in #9 (comment), the call to Connection::query
is not wrapped in a try-catch:
It must instead catch the exception and return false as in the original mysql_num_rows
function.
vendor folder is not available to load autoload.php
From mysql-compat/src/Connection.php:43
$statement = $this->pdo->query($query);
if ($statement === false) {
throw new QueryException('Error executing the query.');
}
For easier backwards compatability and troubleshooting, this might be more helpful if $this.getErrorInfo()
were sent along with the exception.
As it is now, I don't seemingly have a way to get any error information myself, since I don't have access to the Connection from my calling code.
I ran into this because while select id, id from table
works just fine, PDO apparently has an issue with the duplicate field.
I'm using this for now has a hack-fix:
throw new QueryException('Query error ' . serialize($this->getErrorInfo()));
README states that this library is requiring php >= 5.6 and PDO, but composer.json is requiring php >= 5.4 and no extension.
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.