| Simple MySql PHP Class Generator | brianodell.net | |
|---|---|---|
|
PHP Class: |
MySql Table: |
|
|
Primary Index: |
| |
|
Fields/Properties: |
Table Columns: | |
|
This simple package includes the necessary persistence classes to quickly implement your own classes with a variable number of properties. Get up and running with a new backend class and the required persistence layer in a matter of minutes. To use this package... 1. Your PHP code must load the file "loadpackage.php". This file loads the two classes in SimpleMySqlPHP: MySqlConnector and MySqlWriter. 2. Your code should instantiate an object of class MySqlConnector. The initialization function of this class establishes a connection with your MySql server and database; modify the initialization function as necessary. 3. Your new MySqlConnector instance contains a property .sql which can write MySql queries for you as well as a function .Run that can execute queries. 4. Use this page to generate PHP classes that already incorporate SimpleMySqlPHP persistence. Just enter the Class name, MySql Table and Primary Index, then enter Properties for the new Class (one per line) and Column Names in the MySql table (one per line). Be sure to pair up your Class Properties and Column Names as mapping is based on order. And remember to create the Table that you describe in the MySql database your MySqlConnector class links with! For more information: The classes in this package are fully documented with descriptions of the available functions and their use. | ||