Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>public function setMemberRecord($data, $brand_id, $organization_id, $context = null) { global $gRegDbManager; $sql = "insert into member ......" $gRegDbManager-&gt;DbQuery($sql); // Popuplate the iid from the insert $params['iid'] = $gRegDbManager-&gt;DbLastInsertId(); $data = some operations return (int)$data; } public function getMemberRecord($field, $id, $brand_id, $organization_id, $organization_level_account = null) { global $gRegDbManager; $field = mysql_escape_string($field); $id = mysql_escape_string($id); $sql = "SELECT * FROM " . DB_REGISTRATION_DATABASE . ".member WHERE $field = '$id' "; if($organization_level_account) { $sql .= "AND organization_fk = " . $organization_id; } else { $sql .= "AND brand_fk = " . $brand_id; } $sql .= " LIMIT 1"; $results = $gRegDbManager-&gt;DbGetAll($sql); if(count($results) &gt; 0) { return $results[0]; } return; } /* * ****************************************************************************************************** * Updates member record in the member table * ******************************************************************************************************* */ public function updateMemberRecord($id, $changes) { global $gRegDbManager; $id = mysql_escape_string($id); if(!empty($changes)) { $sql = "UPDATE " . DB_REGISTRATION_DATABASE . ".member SET "; foreach($changes as $field =&gt; $value) { $sql .= mysql_escape_string($field) . " = '" . mysql_escape_string($value) . "', "; } $sql = rtrim($sql, ", "); $sql .= " WHERE iid = '$id'"; $gRegDbManager-&gt;DbQuery($sql); } else { return false; } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload