ajaxCRUD.com

» a PHP class to Create, Read, Update, & Delete from a mysql database table using AJAX

   by loud canvas media

AjaxCRUD Class Documentation / Reference Material

<< Reference overview
<< Home

ajaxCRUD

constructor for instantiating the class
new ajaxCrud ( String buttonText, String dbTableName, String dbPrimaryKey, [ String ajaxcrudDir = ""] )
This constuctor is used to instantiate the PHP object. You must pass in the three required values and this will create your ajaxCRUD object!

buttonText
The name of the item your database table is defining (eg for a table of people this value would be "Person")
dbTable
This is the name of your database table
dbPrimaryKey
This is the primary key of the database table
ajaxcrudDir(optional)
Defaults to "". If you want to put your ajaxcrud file(s) elsewhere in your dir structure, change this variable (eg "../ajaxcrud")

Details

Type constructor
Returns object

Example

$tblDemo = new ajaxCRUD("Apple", "tblApples", "pkAppleID");

Example2: ajaxCRUD("Item", "ItemTable", "id") will yield an ADD button that says "Add Item"
Example3: ajaxCRUD("PERSON", "tblPerson", "pkPersonID") will yield an ADD button that says "Add PERSON"
Example4: ajaxCRUD("EMPLOYEE", "tblEmployee", "pkEmployeeID", "../ajaxcrud") // the php file that uses this must have all ajaxCRUD files in the ../ajaxcrud dir

See also

New, Edit

 

"Thanks for the great script, you rock big time."
~Daniel

What is a business/commercial website?

A commercial website is one created for a business, for which purpose is generating revenue or cash flow of any type (and that isn't under a non-profit organization). So if you're selling a product, selling advertisement, selling a service, or just marketing a commercial business, your site is commercial. A company website is also commercial even if it doesn't sell anything, as it's purpose is to front a commercial company.
Close