entomb / obj-mysql Goto Github PK
View Code? Open in Web Editor NEWSimple MySQL Abstraction Layer and mysqli_ result wrapper
Simple MySQL Abstraction Layer and mysqli_ result wrapper
for autocompletion in phpStorm please set the correct DOCBlock for the query() method in OBJ_mysql.php
/**
* Mysql Query
*
* @param string $sql
* @param bool $params
* @return bool|int|OBJ_mysql_result|void
*/
I have loop with >50k iterations. (Social network API calls). Each call I save some data and my SQL request pushed ups to logs array.
Maybe it's better to add some logSize and/or enableLogs props to class config? Or at least clearLogs() method.
After all I really like your lib.
This code is outdated and is not under indentation standards. this should be fixed.
Also, some kind of documentation should be added.
I think "UTF-8" incorrect because I have "???? ??" in non-english string values. And seems "utf8" work better to me.
All examples that I find used "utf8"
http://stackoverflow.com/questions/10829816/php-set-character-names-using-mysqli
http://www.php.net/manual/en/mysqli.set-charset.php
Thanks
We need a num rows function added.
when there is an error in the config... like a wrong database name... mysqli_connect issues a warning like
Warning: mysqli_connect(): (HY000/1049): Unknown database 'x' in OBJ_mysql.php on line 104
a solution would be to use @mysqli_connect()
How ist it possible to set NULL on an update-Command?
Hello,
line 447 of OBJ_mysql.php contains an undefined variable.
$item has to be replace with $var to work properly.
Current line 447:
$var = "'".round(floatval(str_replace(",",".",$item)),6)."'";
But besides that you wrote a nice class!
Best regards.
If exit_on_error is false there is a warning like:
Warning: mysqli_set_charset() expects parameter 1 to be mysqli, boolean given in OBJ_mysql.php on line 121
It can be prevented by changing OBJ_mysql.php line 87, from:
$this->connect();
$this->set_charset($this->charset);
to
if($this->connect())
$this->set_charset($this->charset);
If mysqli_connect fails the current error message is
"Error connecting to mysql server"
How about giving more info like the database and hostname like
"Error connecting to mysql database '$this->database' on server '$this->hostname'"
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; OBJ_mysql_result has a deprecated constructor in /home/vagrant/Code/expert-executare/vendor/obj-mysql/OBJ_mysql_result.php on line 27
Call Stack
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.