Page MenuHomec4science

20151106.phame.post.mailkey.2.php
No OneTemporary

File Metadata

Created
Thu, Oct 31, 12:59

20151106.phame.post.mailkey.2.php

<?php
$table = new PhamePost();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $post) {
$id = $post->getID();
echo pht('Adding mail key for Post %d...', $id);
echo "\n";
queryfx(
$conn_w,
'UPDATE %T SET mailKey = %s WHERE id = %d',
$table->getTableName(),
Filesystem::readRandomCharacters(20),
$id);
}

Event Timeline