1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Implement user defined table prefixes

git-svn-id: file:///svn/phpbb/trunk@19 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen
2001-02-22 18:59:06 +00:00
parent 22a1da47f3
commit 4317bbe9be
5 changed files with 73 additions and 73 deletions

View File

@@ -41,23 +41,23 @@ include('page_header.'.$phpEx);
$template->set_block("body", "catrow", "cats");
$template->set_block("catrow", "forumrow", "forums");
$sql = "SELECT * FROM catagories ORDER BY cat_order";
$sql = "SELECT * FROM $categories_table ORDER BY cat_order";
if(!$result = $db->sql_query($sql))
{
error_die($db, QUERY_ERROR);
error_die($db, QUERY_ERROR);
}
$total_rows = $db->sql_numrows();
if($total_rows)
{
$rows = $db->sql_fetchrowset($result);
for($x = 0; $x < $total_rows; $x++)
{
$rows = $db->sql_fetchrowset($result);
for($x = 0; $x < $total_rows; $x++)
{
$template->set_var(array("CAT_ID" => $rows[$x]["cat_id"],
$template->set_var(array("CAT_ID" => $rows[$x]["cat_id"],
"PHP_SELF" => $PHP_SELF,
"CAT_DESC" => stripslashes($rows[$x]["cat_title"])));
$sub_sql = "SELECT f.* FROM forums f WHERE f.cat_id = '".$rows[$x]["cat_id"]."' ORDER BY forum_id";
$sub_sql = "SELECT f.* FROM $forums_table f WHERE f.cat_id = '".$rows[$x]["cat_id"]."' ORDER BY forum_id";
if(!$sub_result = $db->sql_query($sub_sql))
{
error_die($db, QUERY_ERROR);