From 71f2efd7af4b32eb514c134769fc969e5e64bd2b Mon Sep 17 00:00:00 2001 From: canyonknight Date: Wed, 23 May 2012 15:25:23 -0400 Subject: account_search_results.php: Pull out DB code * Move DB code from account_search_results.php to already existing function in acctfuncs.inc.php * Centralization of DB code important in a future transition to PDO interface Signed-off-by: canyonknight Signed-off-by: Lukas Fleischer --- web/lib/acctfuncs.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'web/lib/acctfuncs.inc.php') diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index bb1f6e89..7a18f76a 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -323,6 +323,12 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", $dbh = db_connect(); $result = db_query($q, $dbh); + $num_rows = mysql_num_rows($result); + + while ($row = mysql_fetch_assoc($result)) { + $userinfo[] = $row; + } + include("account_search_results.php"); return; } -- cgit v1.2.3-24-g4f1b