PHP Classes

File: README

Recommend this page to a friend!
  Classes of Christian Velin   DbCodeBuilder   README   Download  
File: README
Role: Documentation
Content type: text/plain
Description: Readme file with guidelines and important points
Class: DbCodeBuilder
Generate code to access databases as data objects
Author: By
Last change: Added written source
Date: 17 years ago
Size: 1,565 bytes
 

Contents

Class file image Download
README The code generated by this software was deeply inspired by this article: http://www.odi.ch/prog/design/php/guide.php VERSION HISTORY Since 0.1 - Implemented phpdoc tags on all generated code - Implemented full OO code in the script and in the generated code. REQUIREMENTS There are a few things that this code will not do and there are a few things to consider when using the generated code: 1. The code require your tables to be constructed a certain way. The first column in every table should be the primary key of the table, setting the primary key on any other column will render useless code. This is a bug and it will be resolved in version 0.3. 2. The generated code does not support primary key columns without AUTO_INCREMENT set, which basically means that no id is generated in the php code, but must be generated by the db itself, this issue will also be adressed in version 0.3. 3. A VO is an exact replication of a single table row and should therefore be treated in much the same way you treat data in a table. Do not blindly insert data into it, since there is no logic to check or verify it. Use regular PHP methods to escape hazardous characters and ALWAYS verify input from forms before submitting the data to a VO. 4. The generated VOs does not contain a constructor which would allow for easier creation of VOs, and would reduce the risk of creating a defective VO. The implementation of such a constructor is planned for version 0.3, as of now the only way to create a proper VO is with the "setter" methods.