devryan / GamePanelX-V3

The Original Free and Open Source Game Control Panel
https://www.gamepanelx.com
Other
131 stars 94 forks source link

[WIP] Update to MySQLI and Code Optimizations #148

Closed ethsmith closed 7 years ago

ethsmith commented 8 years ago

This is the PR that updates from the old MySQL functions in PHP to the new MySQLI API. I checked the WHOLE codebase TWICE so I should have updated all MySQL functions but please let me know if you spot some that I didn't update.

This PR will also have some code improvements such as custom functions for the mysqli logic for neater code and to prevent repeated code as well as general code improvements.

If there is any bugs with this PR (although there shouldn't be because they are just updates and code improvements) please comment below or send an issue to my repo for GPX instead of main until this PR is pulled.

Track progress for this PR with this checklist (plus I will comment @devryan when it is finished.)

TNovalis commented 8 years ago

MySQLI not implemented correctly.

function_exists('mysql_connect') is still called here

For the procedural style being used, the queries are missing the $link parameter. As seen here in the install file.

ethsmith commented 8 years ago

@xognovalis I noticed that as well but it was already late at night. I will have the fix made later today. Sorry.

devryan commented 8 years ago

No need for apologies! Let me know when it's all solid :+1:

ethsmith commented 8 years ago

@devryan @xognovalis Just to let you know and not leave you in the dark, I am working on a course project rn and that is why I haven't committed anything so far. I will be committing some code optimizations today and (hopefully) finishing MySQLI support.

ethsmith commented 8 years ago

@devryan Just to let you know so that after we merge this pull request and you want to update, I am going to setup a db connection file in the includes folder and have the files require it for running. This will prevent us from having to create a new connection multiple times.

ethsmith commented 8 years ago

Alright did a lot of updating to the mysqli functions, will be finishing it tonight or after class tomorrow.

TNovalis commented 8 years ago

ayyyy :+1:

devryan commented 7 years ago

What's the status on this one?

ethsmith commented 7 years ago

@devryan got it pretty updated but I am really busy with work rn so I will just close this for now and resend the PR when I finish it.

TheDiamondYT1 commented 7 years ago

Or just leave it open...