» 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


show only a few fields from your table instead of all of them
void showOnly ( String fieldList )
Use this function when you have a large table and only want to show a FEW fields by default instead of all of them. This prevents you from having to call omitField, omitAddField or omitFieldCompletely for each field you don't want to show.

You can also use this function to REORDER your database fields (different from the order defined by your schema), if desired.

You can also use this function to ADD custom-defined fields to your HTML table, which do not necessarily need to exist in your db table. Then you can apply custom display logic on them with formatFieldWithFunction or formatFieldWithFunctionAdvanced.


Type function
Returns void
Default all fields


A list of fields (comma delimited) you want to show.


$tblDemo->showOnly("fldTitle, fldName, fldPhone");

Example 2:

$tblDemo->showOnly("fldTitle, fldName, fld_not_in_db, fldPhone");
function getCarPurchaseDate($data, $id){
   //tblCar can be ANOTHER table completely
   $carInfo = qr("SELECT fldPurchaseDate 
                             FROM tblCar WHERE fkCarBuyerID = $id");
   $purchaseDate = $carInfo['fldPurchaseDate'];   
   return $purchaseDate;

See also

New, Edit


"GREEEAT functions! Easily understandable code, I`m loooovving it. Great work! :D "
~Svend Koustrup

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.