ajaxCRUD.com
» a PHP class to create / read / update / delete from a database table using AJAX
by loud canvas mediaAjaxCRUD API Reference
|
<< Reference overview << Home Object: ajaxCRUDConstructorFunctions
Variables |
defineRelationshipdefines a relationship between your table and another (via the foreign key)
void defineRelationship ( String dbMainTableFK, String dbOtherTable, String dbOtherTablePK, String dbOtherTableField [, String dbOtherTableSortField = "", int required = 1] )
This function sets the "allowable" values in a dropdown box for a 1-Many relationship. Your dropdown VALUE will be the foreign key and the option TEXT will be the field of your choosing in the associated table.
Details
Parameters
Example$tblDemo->defineRelationship("fkOtherTableID", "tblOtherTable", "pkOtherTableID", "fldOtherTableField");
See also |
"just what i [was] look[ing] for..."
~Sergey
