How to change database information within aMember script/code?

Discussion in 'aMember Pro v.4' started by adrianogaleno, Mar 18, 2013.

  1. adrianogaleno

    adrianogaleno Member

    Joined:
    Jun 26, 2007
    Messages:
    34
    Hello, I have one table inside aMember database that I would like to update (and insert data) within aMember code. What would be the best way to do that? Would it be queryQuick? Can you please provide me an example? I try to follow the documentation (http://www.amember.com/docs/API/Db) but I didn't have much success.

    Thanks,
    Adriano
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Here is example:
    PHP:

    include "/amember/bootstrap.php";
    $di Am_Di::getInstance();
    $di->db->query("update TABLENAME set key = ? where record_id=?"$value$record_id);

Share This Page