What can you find here?

2.08.2007 | Author:Black iD Team

Hello again,

I have started off this new section for you so that I can give you whatever I have and whatever I have made. I have been programming PHP for more than an year now. I must say that my style of coding has changed a lot. I used to be a procedural programmer earlier as I had begun my career from a VB 6 background. But when I entered the web world, I came in contact with the PHP language (know how). Then with a few sore comments from my clients, I came down to the world of hard core professional PHP programming. The world had no place for procedural programmers. So I had to adapt myself to OOPHP. I am glad I did that. Some bad experiences are worth having. Since then I have struggled hard to reach a real “professional programmer’s” level. Though I am quite far off the destination, atleast I know now that I am on the right track.

Now with more and more exposure to the web world, I came across my second tool, MySQL. I have written a class in PHP to handle databases for mysql. Using this class, what I believe, should ease off much of development time. In brief you should be having such a code in the class.


$db = new HTMLdb;
$db->connect('dbhost','username','password','dbname');
$db->table_array_from_tablename('tablename');
/* returns a keyed array of the entire table structure. something like this
Array(0=>Array('fld1'=>'fld1_row1','fld2'=>'fld2_row1'),
1=>Array('fld1'=>'fld1_row2','fld2'=>'fld2_row2')...)
*/

some other methods include

  • table_array_from_sql
  • flat_field_array_from_sql
  • associative_field_array
  • generateHTMLForm
  • generateHTMLUpdateForm
  • Insert
  • Update

And many more. I will be releasing the first version of this database class soon. Note that this class is currently useful for only MySQL database system. We will be working on the other database systems soon.

Leave a Reply