In addition to [my post in this thread](http://www.daniweb.com/web-development/php/threads/429740/php-best-practice#post1841569) I've decided to post an extended example, which also implements functions for inserts and updates. I hope the code is straightforward enough. If not, reply and let me know. The table structure I've used for my test is the following: CREATE TABLE `contacts` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(64) NOT NULL, `password` varchar(64) NOT NULL, `first_name` varchar(64) DEFAULT NULL, `last_name` varchar(64) DEFAULT NULL, `email` varchar(64) NOT NULL, PRIMARY KEY (`id`) ) And finally, here is how to use it: <?php # Definition of my table structure $tableConfig = array …

Member Avatar
Member Avatar
+4 forum 1

I made this program during forum discussion for accessing configuration relative to module directory, not main program's position (which can be accessed by sys.argv[0]'s directoryname). As the thread is closed I post my proves as code snippet.

Member Avatar
+0 forum 0

The End.