forked from science-ation/science-ation
4 files have had some adjustments to the database lines
This commit is contained in:
parent
a0ed2882e8
commit
8f05b7e4cb
@ -303,10 +303,7 @@ foreach ($tours as $x => $t) {
|
|||||||
$stmt = $pdo->prepare("INSERT INTO tours_choice
|
$stmt = $pdo->prepare("INSERT INTO tours_choice
|
||||||
(`students_id`,`registrations_id`,
|
(`students_id`,`registrations_id`,
|
||||||
`tour_id`,`year`,`rank`)
|
`tour_id`,`year`,`rank`)
|
||||||
VALUES (
|
VALUES (?,?,?,?,0)");
|
||||||
'?', '?',
|
|
||||||
'?', '?',
|
|
||||||
'0')");
|
|
||||||
$stmt->execute([$sid,$s['registrations_id'],$t['id'],$config['FAIRYEAR']]);
|
$stmt->execute([$sid,$s['registrations_id'],$t['id'],$config['FAIRYEAR']]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,8 +114,8 @@ if ($show == 'missing')
|
|||||||
else
|
else
|
||||||
$showquery = '';
|
$showquery = '';
|
||||||
|
|
||||||
$q = $pdo->prepare("SELECT * FROM translations WHERE lang=? ? ORDER BY str");
|
$q = $pdo->prepare("SELECT * FROM translations WHERE lang=? $showquery ORDER BY str");
|
||||||
$q->execute([get_value_from_array($_SESSION, 'translang'),$showquery]);
|
$q->execute([get_value_from_array($_SESSION, 'translang')]);
|
||||||
$num = $q->rowCount();
|
$num = $q->rowCount();
|
||||||
echo i18n('Showing %1 translation strings', array($num), array('number of strings'));
|
echo i18n('Showing %1 translation strings', array($num), array('number of strings'));
|
||||||
|
|
||||||
|
@ -123,16 +123,7 @@ function config_update_variables($fairyear = NULL, $lastfairyear = NULL)
|
|||||||
|
|
||||||
$v = $r2->fetch(PDO::FETCH_ASSOC);
|
$v = $r2->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
$r3 = $pdo->prepare('INSERT INTO config (var,val,category,type,type_values,ord,description,year) VALUES (
|
$r3 = $pdo->prepare('INSERT INTO config (var,val,category,type,type_values,ord,description,year) VALUES (?,?,?,?,?,?,?,?)');
|
||||||
?,
|
|
||||||
?,
|
|
||||||
?,
|
|
||||||
?,
|
|
||||||
?,
|
|
||||||
?,
|
|
||||||
?,
|
|
||||||
?)');
|
|
||||||
|
|
||||||
$r3->execute([$pdo->quote($v['var']),$pdo->quote($v['val']),$pdo->quote($v['category']),$pdo->quote($v['type']),$pdo->quote($v['type_values']),$pdo->quote($v['ord']),$pdo->quote($v['description']),$fairyear]);
|
$r3->execute([$pdo->quote($v['var']),$pdo->quote($v['val']),$pdo->quote($v['category']),$pdo->quote($v['type']),$pdo->quote($v['type_values']),$pdo->quote($v['ord']),$pdo->quote($v['description']),$fairyear]);
|
||||||
show_pdo_errors_if_any($pdo);
|
show_pdo_errors_if_any($pdo);
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ function db_update_118_post()
|
|||||||
$password .= $available[rand(0, $availlen)];
|
$password .= $available[rand(0, $availlen)];
|
||||||
|
|
||||||
// set passwordset to 0000-00-00 to force it to expire on next login
|
// set passwordset to 0000-00-00 to force it to expire on next login
|
||||||
$sql = 'INSERT INTO users (`types`,`username`,`created`,`password`,`passwordset`,`' . implode('`,`','?') . '`,`year`) VALUES (';
|
$sql = 'INSERT INTO users (`types`,`username`,`created`,`password`,`passwordset`,`' . implode('`,`,?') . '`,`year`) VALUES (';
|
||||||
$sql .= "'sponsor',?,NOW(),?,'0000-00-00'";
|
$sql .= "'sponsor',?,NOW(),?,'0000-00-00'";
|
||||||
foreach ($userfields AS $f) {
|
foreach ($userfields AS $f) {
|
||||||
$sql .= ",'" . $r->$f . "'";
|
$sql .= ",'" . $r->$f . "'";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user