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

Object: ajaxCRUD

Constructor

Name Requires Returns Default Short description Example
ajaxCRUD object constructor for instantiating the class
new ajaxCrud ( String buttonText, String dbTableName, String dbPrimaryKey, [ String ajaxcrudDir = ""] ) More...
Example

Functions

Name Requires Returns Default Short description Example
addAjaxFilterBox void adds a search box at the top of the page More... Example
addAjaxFilterBoxAllFields all fields searchable adds searchboxes for all fields in your table More... Example
addButton void adds a button to the bottom of the page More... Example
addButtonToRow void no button adds a button to every row and sends the id (pk) of that item to any url More... Example
addOrderBy void orders the table by a specified field More... Example
addTableBorder void off adds a border to the html table
this function is deprecated! -- please use setCSSFile to control style/layout
More...
Example
addValueOnInsert void sets a value to a field on row insert More... Example
addWhereClause void null adds a SQL "where clause" to the query More... Example
appendUploadFilename setFileUpload no value appended append the value of the row to the beginning of the filename More... Example
defineAllowableValues void define "allowable" values for a field. More... Example
defineCheckbox void 1,0 Sets the field to be of type 'checkbox'. More... Example
defineRelationship void defines a relationship between your table and another (via the foreign key) More... Example
disableTableHeaders void table headers: true Turns off html table headers for the table More... Example
disallowAdd void disallow new rows to be added to the table More... Example
disallowDelete void disallows row deletion More... Example
disallowEdit void disallows a field to be edited More... Example
displayAddFormTop void bring the Add Row form to the top of the page More... Example
displayAs void actual field name displays the field name in the table under a pseudonym More... Example
formatFieldWithFunction a user-defined function to be set formatted data non-formatted data format data in a column with a custom function More... Example
formatFieldWithFunctionAdvanced a user-defined function to be set formatted data non-formatted data format data in a column with a custom function More... Example
getNumRows int Returns the number of rows returned More... Example
insertRowsReturned dynamic span w/row count 0 Displays the number of rows returned (can be put anywhere in your application view). More... Example
modifyFieldWithClass void add a css class to a field (used for things like jquery validation or field masking) More... Example
omitAddField void omits the input field from displaying when adding a row More... Example
omitField void omits a field from displaying in the table More... Example
omitFieldCompletely void field not omitted this function calls both omitField and omitAddField for a field More... Example
omitPrimaryKey void omits the primary key from displaying in the table More... Example
onAddExecuteCallBackFunction (callback function) void calls a local function when a new row is added More... Example
onDeleteFileExecuteCallBackFunction setFileUpload, (callback function) void calls a local function when a file (that was previously uploaded) is deleted More... Example
onFileUploadExecuteCallBackFunction setFileUpload, your callback function void calls a local function when a file is uploaded More... Example
onUpdateExecuteCallBackFunction (callback function) void calls a local, user-defined php function after a particular field is edited/updated More... Example
orderFields re-sorted fields in table order in database schema sort the fields order in the database More... Example
setAddFieldNote void null Puts a note (description of the field) next to it when adding a column More... Example
setAddPlaceholderText null null Puts placeholder text on the input fields More... Example
setAjaxFilterBoxSize addAjaxFilterBox or addAjaxFilterBoxAllFields 10 **THIS FUNCTION IS DEPRECATED AS OF V6.0; use second (optional) param of addAjaxFilterBox instead**

sets the size (lengh of the textbox) of an ajax filter box More...
Example
setCSSFile void default.css Sets a css file as the stylesheet to be used to render the table. More... Example
setExactSearchField void Table filter assist function; sets a field to use an EXACT search. More... Example
setFileUpload web-safe filename of uploaded file (on upload allows a field to accept file uploads More... Example
setInitialAddFieldValue null null Set the initial value for a field (when adding a row) Example
setLimit void 50 set the limit of number of rows to display More... Example
setOrientation void horizontal set the orientation of the table (i.e. set to veritcal) More... Example
setTextareaHeight void input box Sets the textarea height for a field More... Example
setTextboxWidth void 20 Sets the width size for a textbox field More... Example
showCheckboxAll void Set ALL checkboxes for a field (in a column) to be on of off. More... Example
showCSVExportOption void Displays a button which outputs table to CSV format More... Example
showOnly void all fields show only a few fields from your table instead of all of them More... Example
showTable ajaxCRUD (the constructor) void (displays the table) function to "run" the script / display the table More... Example
turnOffAjaxADD void (ajax used for adding a row) Turns off ajax for the CREATE crud operation (adding a row). More... Example
turnOffAjaxEditing void turns off the ability to edit ALL fields. More... Example
turnOffPaging void paging at 50/page turn off paging so total rows returns maxes at a value More... Example
turnOffSorting void sorting: on Turns off the ability to sort table by clicking the header titles More... Example
validateDeleteWithFunction a user-defined function to be set user-defined method returns true or false Allows you to set logic allowing if deletion of certain rows is permissible or not More... Example
validateUpdateWithFunction a user-defined function to be set user-defined method returns true or false Allows you to set logic allowing if updating a row is permissible or not More... Example

Variables

Name Requires Type Default Short description Example
actionText variable Action Change the text 'Action' that appears in the table header Example
addButtonText variable Add {Item} Overwrites the text of the Add button More... Example
addButtonToRowWindowOpen variable same When a button is added to row (addButtonToRow) the window in which to open page (ALL buttons). More... Example
addMessage variable {Item} added The message that displays after you add a new item (and you're not using ajax adding) More... Example
addText variable Add The word that displays in the button for adding a new row Example
advance upeoiyoo uretyoop rrywupor Hello! online payday loan service , cialis , advance payday service , payday cash loan , payday advance loan , More... Example
ajaxcrud_where_clause session_start(); variable Most recent/active sql WHERE clause used by the ajaxcrud table. More... Example
canadian_cialis uewioyru ytpytuwe ypwwweyu Hello! sildenafil , online cialis , canadian cialis , tadalafil , buy cialis , More... Example
cancelText variable Cancel The word that displays in the button for Cancelling out of an add form (slides the form up) Example
cellspacing variable 0 cellspacing for the html table that displays the database table Example
cheap_cialis epeuyieu iyouroeo ppteieyy Hello! buy cialis online , buy cialis online , order cialis , cheap cialis , cheap cialis online , More... Example
cheap_viagra weootopy truiyrtu wuoiieoy Hello! cheap cialis , cheap viagra , buy cialis , cialis sale , cialis , More... Example
cialis oroopoie wtreyiuu oowoiwyy Hello! buy generic viagra , generic cialis online , order viagra online , order cialis online , More... Example
cialis_deals eitroyir rieeouyw reuewtre Hello! cialis deals , cheap cialis online , cialis cheap , online pharmacy cialis , payday advances , More... Example
cialis_online tyueueir ioypyyuo topupuyy Hello! viagra , cialis online , viagra , order cialis , online viagra , More... Example
css variable true set to false if you don't want to use a css stylesheet More...
deleteText variable Delete The word that displays in the button for deleting an existing row Example
delivery toeiioey tiieorpw rptpoeeu Hello! fast delivery viagra , cialis fast delivery , low viagra price , low cialis price , More... Example
doActionOnShowTable variable true when set to true CRUD actions will happen when showTable() is called More... Example
emptyTableMessage variable The message that appears when a table is empty. Example
fileDeleteText variable del Change the word that displays for the link that handles file deletions. Example
fileEditText variable edit Change the word that displays for the link that handles file updates. Example
for ioyyryot iowytyeo yitepyru Hello! generic for viagra , cialis discount online , generic for viagra , cialis discount online , More... Example
generic_cialis rrwweiip uurewpye wuoptity Hello! online pharmacy cialis , cialis online , viagra online pharmacy , generic cialis , free viagra , More... Example
generic_cialis_pills wepowiui eeywwyut iyuwoorr Very nice, cheap cialis , cialis online prices , generic cialis pills , generic cialis pills , order cialis , More... Example
generic_viagra ioyoreru ytyietwr rrweoyyw Hello! viagra , cialis , generic viagra , generic cialis , More... Example
herbal iyiiurpw wpwuytwu puryiwuy Hello! female herbal viagra , cialis purchase online , female herbal viagra , cialis purchase online , More... Example
hover_color variable #B1CFF5 (a light blue) color when you hover over a cell to change its value More... Example
Johnb432 ierywwyt wuoyroip retywrrw Your goal is to breed all the different dragons available to you dagckkdfcagc More... Example
Johng83 tuueytto eiyeewyo ooupitti Totally pent subject matter, appreciate it for selective information. cffegkeebeea More... Example
las oryyteou yoypiiiw uppiiror Hello! online las vegas payday loans , online las vegas payday loans , online las vegas payday loans , online las vegas payday loans , online las vegas payday loans , More... Example
online oryyteou yoypiiiw uppiiror Hello! american online marketing payday loans , american online marketing payday loans , american online marketing payday loans , american online marketing payday loans , american online marketing payday loans , More... Example
order_cialis uyyiuyyu rwiorpty eyryerui Hello! cialis dosage , cialis dosage , cheap viagra , cheap viagra , order cialis , More... Example
payday ioopiotp ipeuyrwo wrorpyro Hello! online payday loan service , canadian cialis , advance payday service , payday cash loan , payday advance loan , More... Example
payday_cash yywytuyu eipeyyro yeiiroip Hello! quik payday loan , payday cash , cialis fast delivery , cialis pills , order cialis , More... Example
payday_loans oryyteou yoypiiiw uppiiror Hello! payday loans , payday loans , cialis , payday loans , payday loans , More... Example
Pharma607 weeyeuww iuoppuur ypwpweru Very nice site! cheap viagra More... Example
Pharmb719 ripieoru wpeyruor riteotyi Very nice site! More... Example
Pharmb884 ouoootyr tuuiuype iowittuu Very nice site! More... Example
Pharmb986 ipouteep trerwwww uiiiewtr Very nice site! [url=http://yieopxa.com/yxyaqkx/2.html]cheap cialis[/url] More... Example
Pharmc475 etpueiro oirrpwww teueyirw Very nice site! cheap cialis http://yieopxa.com/yxyaqkx/4.html More... Example
Pharmc720 uyputwuy otpurete oepyrrup Hello! bdfdgdd interesting bdfdgdd site! I'm really like it! Very, very bdfdgdd good! More... Example
Pharmc9 yreyiryo itrriiyw prppyppp Very nice site! cheap viagra More... Example
Pharmd14 puytyyot iopwwroy yiurpyeo Very nice site! cheap goods More... Example
Pharmd228 tierrrwi ititptpr tetiepie Very nice site! cheap cialis http://oixypea.com/oxovryr/4.html More... Example
Pharmd629 ripieoru wpeyruor riteotyi Very nice site! cheap viagra , cheap viagra , cheap viagra , cheap viagra , cheap viagra , More... Example
Pharmd637 eoiypitr uwpeuwor urpiwwuy Hello! fkaagec interesting fkaagec site! I'm really like it! Very, very fkaagec good! More... Example
Pharmd839 puytyyot iopwwroy yiurpyeo Very nice site! cheap goods More... Example
Pharme440 uytwywyu ewuiiwup oeutwuew Very nice site! cheap cialis http://oixypea.com/oxovryr/4.html More... Example
Pharme471 eupwopee pttoeieo oyuoeope Very nice site! cheap viagra , cheap viagra , cheap viagra , cheap viagra , cheap viagra , More... Example
Pharme63 epwteyio oruptppo opuoruwi Very nice site! cheap cialis http://yieopxa.com/yxyaqkx/4.html More... Example
Pharme676 twueprwi iitutuee trweutyw Very nice site! More... Example
Pharmf31 twueprwi iitutuee trweutyw Very nice site! cheap viagra , cheap viagra , cheap viagra , cheap viagra , cheap viagra , More... Example
Pharmf351 pwwypurp iootppey uryeopit Very nice site! [url=http://oixypea.com/oxovryr/2.html]cheap cialis[/url] More... Example
Pharmf490 ouoootyr tuuiuype iowittuu Very nice site! cheap viagra , cheap viagra , cheap viagra , cheap viagra , cheap viagra , More... Example
Pharmf726 preuerrp rypyouep itrtiotw Hello! deacgac interesting deacgac site! I'm really like it! Very, very deacgac good! More... Example
Pharmg491 ooytieer iopyuuye yeuouuww Hello! edekkck interesting edekkck site! I'm really like it! Very, very edekkck good! More... Example
Pharmg875 eupwopee pttoeieo oyuoeope Very nice site! More... Example
Pharmg904 uieuoyto uuutwort pprtwwyy Very nice site! [url=http://oixypea.com/oxovryr/2.html]cheap cialis[/url] More... Example
Pharmk220 ooyepuit pyipyirt youpreer Very nice site! cheap viagra More... Example
Pharmk624 riytwtwt putortet ouwtyitr Very nice site! cheap viagra More... Example
Pharmk931 ieuwwwwy ywyuuywe tyrpwiyi Very nice site! [url=http://yieopxa.com/yxyaqkx/2.html]cheap cialis[/url] More... Example
showCheckbox variable false puts a checkbox in front of each row More... Example
side iyuwtoie rputirew wyypeter Hello! free viagra , free cialis , cialis side effects , viagra side effects , More... Example
sildenafil_citrate oruoowrp ruyieree iiuoyuuy Hello! sildenafil citrate , generic cialis , viagra price , cialis price , More... Example
soft rrwweiip uurewpye wuoptity Hello! http://cialisonlinepharmacy6.com/ , http://cheapcialis6pharmacy.com/ , http://cheapviagra6pharmacy.com/ , http://purchase6cialisgeneric.com/ , http://viagra6pillsonline.com/ , More... Example
sublingual eieyroyi tipepipw piuoeuwt Hello! how does viagra work , buy sublingual cialis online , how does viagra work , buy sublingual cialis online , More... Example
tadalafil oruoowrp ruyieree iiuoyuuy Hello! sildenafil , tadalafil , viagra , cialis , More... Example
uk iiepeiee ooitpewt oeoitioy Hello! female uk viagra , cialis online pill , female uk viagra , cialis online pill , More... Example
viagra pwpyorop ueueewuw pyuooyoe Hello! http://viagraprofessional8.com/ , http://cialisuperactive8.com/ , http://generic8viagrapills.com/ , http://generic8cialispills.com/ , More... Example
viagra_buy toyupitu erieuopt uewpyitt Hello! generic cialis , cialis price , viagra buy , cialis online , generic cialis , More... Example
viagra_canada teiieopo oueupprr rturtypw Hello! viagra free , cialis free , viagra canada , cialis canada , More... Example
viagra_deal eeipwiwy wewoeoyp uouiuete Hello! viagra fast delivery , cialis fast delivery , viagra deal , cialis deal , More... Example
viagra_dosage urwyiieu ppywrwyi preouowu Hello! cialis dosage , viagra dosage , discount viagra , discount cialis , More... Example
viagra_reviews eieyroyi tipepipw piuoeuwt Hello! viagra reviews , order cialis online not fakeorder quality cialis , viagra reviews , order cialis online not fakeorder quality cialis , More... Example
viagra_sale iyuwtoie rputirew wyypeter Hello! http://cheapest8viagra.com/ , http://cheapest8cialis.com/ , http://best8viagra.com/ , http://best8cialis.com/ , More... Example
viagra_uk iiepeiee ooitpewt oeoitioy Hello! viagra uk , generic cialis overnigh , viagra uk , generic cialis overnigh , More... Example
with iyuwtoie rputirew wyypeter Hello! http://www.freeviagraa8cheap.com/ , http://www.freecialisb8med.com/ , http://www.cialissideeffectsb8pills.com/ , http://www.viagrasideeffectspills8a.com/ , More... Example
New

 

"Thanks a bunch for this class. Man, it really does make turning around a CRUD quickly with cool fade effects for managers. Thanks for making this."
~Fred

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