Quantcast
Channel: XOOPS Web Application System :: Forum
Viewing all articles
Browse latest Browse all 141

Re: MySQLi Connectors Thread [by redheadedrod]

$
0
0
Xoops Development::MySQLi Connectors Thread
There are a couple things I didn't like about the script that was written but it seemed to work. The only issue that has come up is what I will call a programming assumption more than a bug and it hasn't been a big deal.

The Globals item was one of the things I was looking at and another is that where the original connector just returned a value the result of the conversion script was an if than statement. I was hoping that putting this out like this would allow comment and making it a better connector.

The issue with the Module Admin is related to the version check. If you look at the documentation for the calls used the code placed in the class SHOULD work but in reality doesn't work. It also locks the Module Admin class into MySQL, MySQLi and PDO as the database connectors requiring hard coding to add anything else.

At this point I think we can get rid of the switch statement in the admin class and have it just read the current version from the database connector. The database connector then needs to have a function added that will return the version. This will allow someone to just drop in a new connector and need no changes to the code.

I haven't had time to incorporate the code and test it out yet.

I spent some time on this because It would make things a lot easier for me to create a PDO connector. I will take another look through this connector and see if I can simplify some of the code even further. I also wanted to make it easy to move to 2.6 and in reality it took me about an hour to totally convert it to work under 2.6.

Oh and thanks very much for your comments! I hope some others can check it out and share their thoughts as well.

Viewing all articles
Browse latest Browse all 141

Trending Articles