Commit ecb33300 authored by Mike Hibler's avatar Mike Hibler

A couple of minor tweaks to make transitioning to the mysqli module easier.

The current quarterly FreeBSD port set has removed php5 requiring a
transition to php7 (7.2). php7 in turn has removed the mysql module
requiring that we switch to mysqli. Fun times.
parent 64feff35
......@@ -588,7 +588,7 @@ function GET_ANNOUNCEMENTS($user, $update = true)
# Add an apt_announcement_info entry for any announcements which don't have one
$query_result = DBQueryWarn('select a.idx from apt_announcements as a left join apt_announcement_info as i on a.idx=i.aid and ((a.uid_idx is NULL and i.uid_idx="'.$uid_idx.'") or (a.uid_idx is not NULL and a.uid_idx=i.uid_idx)) where a.portal="'.$PORTAL_GENESIS.'" and a.retired=0 and i.uid_idx is NULL and (a.uid_idx is NULL or a.uid_idx="'.$uid_idx.'")');
while ($row = mysql_fetch_array($query_result, MYSQL_NUM)) {
while ($row = mysql_fetch_row($query_result)) {
DBQueryWarn('insert into apt_announcement_info set aid="'.$row[0].'", uid_idx="'.$uid_idx.'",seen_count=0');
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
# Copyright (c) 2000-2019 University of Utah and the Flux Group.
......@@ -1042,7 +1042,7 @@ if (! $DBlinkid) {
USERERROR("Temporary resource error; ".
"please try again in a few minutes", 1);
if (!mysql_select_db($TBDBNAME)) {
if (!mysql_select_db($TBDBNAME, $DBlinkid)) {
TBERROR("Could not select DB after connecting!", 1);
$DBlinkids = array();
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment