DML functions

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
Posts: 6
Joined: 2013-01-22 06:40

DML functions

Post by azharhussain » 2013-01-22 06:48

Like sqlvalue function, which function shall i use for search, insert and update in the table (please share samples if you can) ?

User avatar
Site Admin
Posts: 1050
Joined: 2012-09-27 14:46

Re: DML functions

Post by a.gneady » 2013-01-23 09:50

sql() is the function to use for this purpose. Here are some examples:

To delete/edit/insert:

Code: Select all

sql("update table `customers` set phone='123456789' where customerID=22", $eo);
To retrieve (select) records:

Code: Select all

$records = sql("select * from `customers` where state='NY' order by customerID", $eo);
while($customer = mysql_fetch_assoc($records)){
   echo "{$customer['firstName']} {$customer['lastName']} <br/>";
:idea: Learn all the tips and tricks of customizing AppGini apps through our online course.
:arrow: Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
:arrow: Summary Reports plugin: Build powerful reports and charts for your AppGini apps.
:arrow: Search Page Maker: Compose user-friendly yet powerful search pages for your AppGini apps.

Post Reply