Am Mo, den 18.04.2005 schrieb NFO (Norman Fox) um 18:37:
> OK so I develop in an Apache/PHP/MySQL/WinXP environment but production is on > a Unix box. We recently switched production to MySQL 4.1. So I upgraded my > development copy. According to you current documentation I need to be > running mysqli to realize the full functionality of 4.1. Ok fine I switched > my module to mysqli. Fortunately I'm using PEAR:DB for my db communication > and have one central connection file so changing that from mysql to mysqli > was relatively painless, but the thousands of lines of code with > mysql_escape_string are not working, and a simple find and replace function > will not work because mysqli_escape_string requires different parameters (yes > I can and will replace it with addslashes, but I've always felt > mysql_escape_string was more robust for MySQL). > > So first this is a bit of a cathartic rant after 1+ weeks of on and off > attempting to get my development environment to function with my production > environment (I can't be the only one out there whose sandbox runs on their > local windows box, but runs production on a Unix server). > > Second could you please elaborate on the following (perhaps with a few > examples that are more detailed than those in the mysqli comments:) > Which samples should be more detailled? > I can't believe it never occurred to you that backwards compatibility would > be useful With an optional parameter for resources (as used in mysqli) it was nearly impossible to extend existing functions without breaking BC. mysqli was never designed as a replacement for mysql, it's completely new. Using the OO-Interface of mysqli it should be possible to migrate existing applications using mysql within a few minutes. Btw. you should fix your mail client (line breaks after 70 chars). /Georg
