In Progress

Write a PHP MySQL AppGini Function

I have a MySQL database application already in place. Application was built with AppGini

The 2 tables and fields relevant to this project are:

client_id with the fields: status, last_sale, id

sales with the fields; customer (contains [url removed, login to view]), date, time, sale (amount), comments, id

I need to add a function in [url removed, login to view] to update the client_id table when a sales record is added/updated in the sales table. I will call the function in the sales hooks file.

First, the function needs to update the last_sale field (last sale field data formatted to the month, year, and amount of this sales record, as in May 2012 $450 from the sales table)

Then second, to check if [url removed, login to view] is not == "active", then set Status field to Active. I say if status is not == Active because we also have a status of stale. I will be setting the status to stale if a customer has not purchased for 1 year, but if a stale(or any other status) customer makes a new sale, I want to change them to active too.

Info from AppGini website.


Called after executing the update query and before executing the ownership update query. If you open the generated hooks/[url removed, login to view] file in a text editor (where tablename is the name of the concerned table), you can see this function defined as follows:

function tablename_after_update($data, $memberInfo, &$args){

return TRUE;



$data is an associative array where the keys are field names and the values are the field data values that were inserted into the new record. It also includes the item $data['selectedID'] which stores the value of the primary key for the new record.

$memberInfo is an array containing details of the member who signed in. Please refer to memberInfo for more details.

$args is currently not used but is reserved for future uses.

Thanks and I hope this is enough info for now.

Skills: MySQL, PHP

See more: appgini, write names, need to write a project, mysql database application, customer database php mysql, value stores, key value stores, write query, update status php mysql, php file array, mysql editor, mysql comments, php text array, php add record mysql table, php table array, mysql add record, table month php, mysql function update, call function, mysql inserted, mysql update field, mysql update values, php file write array, update values mysql, mysql update function

About the Employer:
( 2 reviews ) Edmonton, Canada

Project ID: #4597880

Awarded to:


Hi, I am very good in web application development life cycle.

$66 CAD in 3 days
(3 Reviews)

10 freelancers are bidding on average $163 for this job


Hi, I can help you get this done. Thanks

$144 CAD in 3 days
(753 Reviews)

Quality work assured. Ready to get started. Thanks.

$333 CAD in 2 days
(382 Reviews)

I am ready and expert in PHP and MySQL.

$147 CAD in 5 days
(50 Reviews)

Hi there, We are experts in PHP Open Source (any kind of PHP/MySQL work),wordpress and Ajax/Web 2.0 technology. Some of the projects we completed for php are mentioned below [url removed, login to view] More

$309 CAD in 5 days
(89 Reviews)

Hello Please read more than private message thank you

$139 CAD in 3 days
(59 Reviews)

Hi, First of all thanks for posting this project, I am available to provide you economical services for web development , I have read and understood all of project details. I am expert in software development and c More

$155 CAD in 5 days
(21 Reviews)

I can do your project, please pm for me. Thanks

$80 CAD in 1 day
(29 Reviews)

Software Engineer with 13 years of experience, having passed the PHP and Javascript exams, I have enough skills to complete this project. Please check inside my profile page "How I Made my Former Employers Happy". More

$144 CAD in 3 days
(14 Reviews)

Good afternoon sir, Your project sounds doable within a day, please check PM for more details. Sincerely. -Christian Meier

$120 CAD in 2 days
(4 Reviews)

Hi, requirements understood. ready to go.

$135 CAD in 2 days
(0 Reviews)