Open vinsnet opened 6 years ago
92 occurrences of mysql_connect
I've start to fix this issue, but the problem is deep into the code.
yes, I know..., I get the code some months ago and duplication code was a nightmare (and the work is not finished to clean all of that). Thank you for your help!!
Did you manage to replace all of the mysql_connect stuff?
Yes I've done, But i did not create a PR because i can not test it for the moment. I think we could remove duplicate code and upgrade to another database driver... or build an API based on the same database (Laravel, Loopback.js, ...).
just tested, https://github.com/vinsnet/velobs_web/blob/c66f263ade9c11cf262d9168a3c09a29addb60f3/lib/php/database.php#L50 : unexpected var then another : PHP Fatal error: Call to undefined method Database::getIntance() in /save/devcrgs/src/velobs_web/velobs_web/lib/php/public/getJsonStats.php on line 7
I stopped the tests here. Didn't find the problem
You call the static function with the wrong name : "getIntance" instead of "getInstance" (with a 's')
you mean "I call the static function with the wrong name : "getIntance" instead of "getInstance" (with a 's')", no? ;) you are right, the "s" is missing in all php files. Can you modify your code (along with DB_HOST and the "var" keyword in database.php) and test it please, then commit and PR?
thank you for your time
PS : oups, I thought it was @vinsnet who answered, sorry @windu2b
mysql_connect(HOST,DB_USER,DB_PASS) was found 87
I would try to rewrote it