how to update my custom table after execution of rules i have created a table as follow

&lt;?php

/**
 * @file
 * Implements hook_schema
 */
function core_sms_schema() {
  $schema['core_sms_details'] = array(

    'description' =&gt; 'This table is used to keep track of sms sent/failed on specific date.',
    'fields' =&gt; array(
      'id' =&gt; array(
        'description' =&gt; 'The primary identifier for a node.',
        'type' =&gt; 'serial',
        'unsigned' =&gt; TRUE,
        'not null' =&gt; TRUE,
      ),
      'date' =&gt; array(
        'description' =&gt; 'Date',
        'mysql_type' =&gt; 'TIMESTAMP DEFAULT CURRENT_TIMESTAMP',
        'not null' =&gt; TRUE,
      ),
      'sms_sent' =&gt; array(
        'description' =&gt; 'The SMS sent on particular date.',
        'type' =&gt; 'int',
        'not null' =&gt; TRUE,
        'default' =&gt; '0',
      ),
      'sms_failed' =&gt; array(
        'description' =&gt; 'The SMS failed on particular date.',
        'type' =&gt; 'int',
        'not null' =&gt; TRUE,
        'default' =&gt; '0',
      ),
    ),
    'primary key' =&gt; array('id'),
  );
  return $schema;
}


After a sms has been sent i have to update the columns with number and date. i already have rules also but not able to get how to update the custom table using rules.
In rules you have option to add PHP code inside the Action ->PHP-> "Execute custom PHP code " in that have a code to update the custom table.

The following variables are available and may be used by your PHP code:

Variable name Type    Description

$site   Site    Site information

$node   Content updated content

$node_unchanged Content unchanged content 

you can use for updating the table if its a node

Note : here node represented as a example