Jump to content

phpdanger

New Members
  • Posts

    1
  • Joined

  • Last visited

phpdanger's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Super simple question for a total noob... I am trying to modify some code to write the number "1" to a fiedl in a MySQL database to force all members active. The active field is cuirrently all zero "0". Here is the snippet in question. public function createTable() { $table = new Am_Protect_Table($this, $this->getDb(), '?_users', 'id_user'); $table->setFieldsMapping(array( array(Am_Protect_Table::FIELD_NAME_F, 'full_name'), array(Am_Protect_Table::FIELD_LOGIN, 'user_name'), array(Am_Protect_Table::FIELD_PASS, 'password'), array(Am_Protect_Table::FIELD_EMAIL, 'email'), array("1", 'active'), )); return $table; } -------------------------------------------------------------------------- So my question is this: Is: array("1", 'active'), a valid statement for setting that field to 1? Spoiler: it doesn't work
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.