In Progress Custom Code API

The development of this suggesion is in progress.

eugenio

Administrator
Staff member
With DaDaBIK, you can develop a Web application without coding (no-code); however, you can also add your own custom PHP/Javascript code to the application (using hooks, custom validation functions, custom formatting functions, custom pages etc) in order to fit your needs more precisely (low-code).

To make your custom code more lean, readable and secure, a set of PHP API functions will be provided for the basic and most frequent operations. This functions set will probably be released in DaDaBIK V 12, in 2023.

In V 11.7 (out yesterday), however, the first function, get_record_details(), has already been released as a preview. In one code line you can get the field values of a record belonging to any of the tables you have in your database, without directly executing SQL queries. For example here I am getting all the info (name, address, ... ) of the customer having id 10:

PHP:
$customer_info = get_record_details('customers', 'id', 10);

This thread is to discuss the next functions to implement. These are the ones that at the moment I am thinking to implement:

delete_record (tablename, id_field, id_value)

insert_record (tablename, fields (array), field_values (array) )

update_record (tablename, id_field, id_value, fields_to_update (array), fields_to_update_values (array))

It would be interesting to also have a build_grid() function to use in custom pages (you pass a recordset, you get a standard DaDaBIK results grid), this however is more complicated and probably not a so frequent need.
 
Upvote 1
Top