Check out Atomic Chess, our featured variant for November, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

PHP Functions[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Wed, Jun 13, 2018 11:43 PM UTC:

I modified the connect_to_database() function to no longer use mysql_connect(). While I was converting from mysql functions to PDO methods, I had it open both a mysql connection and a PDO connection. Now it opens only a PDO connection. I also made some further modifications. I set it to use the charset utf8mb4. One consequence I saw of this was that the umlauted i in Caïssa Britannia got messed up. I fixed this by reentering the name. If it happened to this, it may have happened to other game listings in the database. I also set PDO::ATTR_EMULATE_PREPARES to false, which means it will now use native prepares, which pass the SQL and the values separately. I learned that I had been using emulated prepares, which actually puts everything together on the PHP side before passing it to the database. I read that this is supposed to be 100% secure when the charset is set to utf8mb4, but I still wanted to try to get it to use native prepares. Some scripts were giving me problems for a while, and I went back and forth between native and emulated prepares while trying to work out these problems. These problems now seem to be fixed, and the scripts seem to be working well with native prepares. But maybe there are scripts I still need to test. So let me know if anything seems amiss.