Consider the following table:
CREATE TABLE IF NOT EXISTS `tblNBA` ( `id` int(11) NOT NULL auto_increment, `playoffs` varchar(20) default NULL, `logo` text, `name` varchar(60) default NULL, `founded` int(11) default NULL, `description` text, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;View Insert SQL Statements
Playoffs | Logo | Name | Founded | Description |
---|---|---|---|---|
No | Boston Celtics | 1947 | The Boston Celtics is a professional basketball team based in Boston, Massachusetts, playing in the Atlantic Division of the Eastern Conference in the National Basketball Association (NBA). The team is owned by Wycliffe Grousbeck and coached by Doc Rivers, with Danny Ainge as the President of Basketball Operations. Founded in 1946, their 17 NBA Championships are the most for any NBA franchise | |
No | Cleveland Cavaliers | 1970 | ||
No | Chicago Bulls | 1966 | The Chicago Bulls are an American professional basketball team based in Chicago, Illinois, playing in the Central Division of the Eastern Conference in the National Basketball Association (NBA). The team was founded in 1966. They play their home games at the United Center. The team is well known for having one of the greatest dynasties in NBA history during the 1990s, winning six championships in 8 years with two three-peats. All six of those championship teams were led by Michael Jordan, Scottie Pippen and coach Phil Jackson. | |
No | Milwaukee Bucks | 1968 | The Milwaukee Bucks are a professional basketball team based in Milwaukee, Wisconsin. They play in the National Basketball Association (NBA). The current franchise owner is U.S. Senator Herb Kohl. |
#required file and class
require_once ('preheader.php');
include_once ('ajaxCRUD.class.php')
#this one line of code is how you implement the class
$tblDemo = new ajaxCRUD("NBA Team", "tblNBA", "id");
$tblDemo->omitPrimaryKey();
$tblDemo->displayAs("playoffs", "Playoffs");
$tblDemo->displayAs("logo", "Logo");
$tblDemo->displayAs("name", "Name");
$tblDemo->displayAs("founded", "Founded");
$tblDemo->displayAs("description", "Description");
#define that a field if a checkbox
$tblDemo->defineCheckbox('playoffs','Yes','No');
#add an ajax filter box
$tblDemo->addAjaxFilterBox('name');
#formatFieldWithFunction is a powerful method
$tblDemo->formatFieldWithFunction('logo', 'makeImg');
$tblDemo->formatFieldWithFunction('name', 'makeUnderline');
#don't allow table editing
$tblDemo->turnOffAjaxEditing();
#don't allow table adding
$tblDemo->turnOffAjaxADD();
#don't allow deleting of rows
$tblDemo->disallowDelete();
#actually show the table
$tblDemo->showTable();
function makeUnderline($val){
return "<u>$val</u>";
}
function makeImg($val){
return "<img src=\"$val\" width=\"100\" />";
}
Click here to view example outside of the template.
Plan to use ajaxCRUD™ on a business/commercial website? You must purchase a license.
You are allowed to use this product or part(s) of it on a single web site only, belonging to either you or your client. You have to purchase the same product again if you want to use the same product in connection with another or other projects.
Any analysis of the program, embedded data or license files by any means and by any entity whether human or otherwise and including but without limitation to discover details of internal operation, to reverse engineer, to de-compile object code, or to modify for the purposes of modifying behavior is forbidden.
Any analysis of encoded files by any means and by any entity whether human or otherwise and including but without limitation to discover details of file format or modification for the purposes of modifying behavior or scope of their usage is forbidden.
All imagery and fonts used in this product are an integral part of the product. You can use images and fonts only as a part of the web site you build using this product. You can use imagery and fonts to develop one project only. Any kind of separate usage or distribution is strictly prohibited.
You are authorized to make necessary modifications to this product to fit your purposes in accordance with this license.
The product is property of Tania Alekova. You shall not offer this product or part(s) of it, modified or unmodified, for redistribution or resale of any kind. You shall not sub-license, assign, or transfer this product or part(s) of it to any entity.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
If your organization makes a profit, you are a for-profit company. A commercial site 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 commercial even if it doesn't sell anything on the site, as it's purpose is to market/promote a commercial company.
$/mo
Buy NowThe Unlimited License permits you or your company to use ajaxCRUD™ on any/all commercial websites you develop now or in the future.
For any questions please contact us..
$ (one-time)
Buy Now