ericp Posted June 27, 2014 Share Posted June 27, 2014 Hi all, Can anyone help re-code the configuration file, script 18.3, using the prepared Statement Performance so that it can be compatible with the OOP (Object-Oriented Programming) MySQL connection script ((Script 16.1), please? Thanks Link to comment Share on other sites More sharing options...
Larry Posted June 27, 2014 Share Posted June 27, 2014 There's no database-related stuff in the configuration file. You'd just want to use something like script 16.1 for your connection script (mysqli_connect.php in Ch 18). Link to comment Share on other sites More sharing options...
ericp Posted June 28, 2014 Author Share Posted June 28, 2014 Yes, you are right. And I also tried it. You know what? When i define the location of the MySQL connection script in the config.inc.php, using script 16.1, along with the script mysqli_connect.php in Ch 18 for it, the error occurs like this '... on line 15: Constant LIVE already defined'. I know, it's an error!. Then, I commented out the mysqli_connect.php, it requires me to RE-CODE all the files that I used Procedural so far which would take me lots of time. Do you have any suggestion? because I have to switch to OOP gradually one by one, and the config.inc.php is included in the hear.html file, but not in seperate files. Or should I switch to OOP just because of the point in your book saying that it may be more secure and faster? Thanks Link to comment Share on other sites More sharing options...
Larry Posted July 7, 2014 Share Posted July 7, 2014 I'm not exactly following you here. The configuration file just defines the location of the MySQL connection script. Otherwise, the configuration file should do anything relative to MySQL. So what's the problem/question you're having here? Link to comment Share on other sites More sharing options...
ericp Posted August 30, 2014 Author Share Posted August 30, 2014 My mistake, indeed, as I called both the mysqli_connect.php and the mysqli_connect_OOP.php in the config.inc.php file at the same time. One of them should have been called once. Link to comment Share on other sites More sharing options...
Recommended Posts