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
azharhussain
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
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

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: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

Post Reply