Coder Social home page Coder Social logo

obj-mysql's People

Contributors

entomb avatar seanhussey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obj-mysql's Issues

set correct phpDocBlocks

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
     */

Logs might cause memory leak

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.

warning in mysqli_connect

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()

Undefined var in OBJ_mysql.php (line 447)

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.

Warning when using exit_on_error=false

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);

Better error message in case of failed database connection

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 constructor

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.