mirror of
https://github.com/Mibew/tray.git
synced 2025-01-22 18:10:34 +03:00
Replaced reciving associative arrays from database by select_multi_assoc function
This commit is contained in:
parent
720c4472d3
commit
20701ad5da
@ -46,15 +46,8 @@ if (isset($_GET['act']) && $_GET['act'] == 'del') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = mysql_query("select banid,unix_timestamp(dtmtill) as till,address,comment from ${mysqlprefix}chatban", $link)
|
$blockedList = select_multi_assoc("select banid,unix_timestamp(dtmtill) as till,address,comment from ${mysqlprefix}chatban", $link);
|
||||||
or die(' Query failed: ' . db_error($link));
|
|
||||||
|
|
||||||
$blockedList = array();
|
|
||||||
while ($ban = mysql_fetch_array($result, MYSQL_ASSOC)) {
|
|
||||||
$blockedList[] = $ban;
|
|
||||||
}
|
|
||||||
|
|
||||||
mysql_free_result($result);
|
|
||||||
close_connection($link);
|
close_connection($link);
|
||||||
|
|
||||||
setup_pagination($blockedList);
|
setup_pagination($blockedList);
|
||||||
|
@ -50,14 +50,8 @@ function threads_by_userid($userid)
|
|||||||
"from ${mysqlprefix}chatthread " .
|
"from ${mysqlprefix}chatthread " .
|
||||||
"where userid=\"$userid\" order by created DESC", $userid);
|
"where userid=\"$userid\" order by created DESC", $userid);
|
||||||
|
|
||||||
$result = mysql_query($query, $link) or die(' Query failed: ' . db_error($link));
|
$foundThreads = select_multi_assoc($query, $link);
|
||||||
|
|
||||||
$foundThreads = array();
|
|
||||||
while ($thread = mysql_fetch_array($result, MYSQL_ASSOC)) {
|
|
||||||
$foundThreads[] = $thread;
|
|
||||||
}
|
|
||||||
|
|
||||||
mysql_free_result($result);
|
|
||||||
close_connection($link);
|
close_connection($link);
|
||||||
return $foundThreads;
|
return $foundThreads;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user