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