Fixed some hard coded referances to table names

git-svn-id: file:///svn/phpbb/trunk@169 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
James Atkinson 2001-04-17 07:14:50 +00:00
parent 9468f91ea0
commit 26f5fb7dfc
2 changed files with 72 additions and 72 deletions

View file

@ -53,7 +53,7 @@ else
$pagetype = "newtopic"; $pagetype = "newtopic";
$page_title = " $l_postnew"; $page_title = " $l_postnew";
$sql = "SELECT forum_name, forum_access FROM forums WHERE forum_id = '$forum_id'"; $sql = "SELECT forum_name, forum_access FROM ".FORUMS_TABLE." WHERE forum_id = '$forum_id'";
if(!$result = $db->sql_query($sql)) if(!$result = $db->sql_query($sql))
{ {
error_die(SQL_QUERY, "Could not obtain forum/forum access information.", __LINE__, __FILE__); error_die(SQL_QUERY, "Could not obtain forum/forum access information.", __LINE__, __FILE__);

View file

@ -88,7 +88,7 @@ switch($mode)
{ {
// The AUTO_INCREMENT field in MySQL v3.23 dosan't work correctly when there is a row with // The AUTO_INCREMENT field in MySQL v3.23 dosan't work correctly when there is a row with
// -1 in that field so we have to explicitly get the next user ID. // -1 in that field so we have to explicitly get the next user ID.
$sql = "SELECT max(user_id) AS total FROM users"; $sql = "SELECT max(user_id) AS total FROM ".USERS_TABLE;
if($result = $db->sql_query($sql)) if($result = $db->sql_query($sql))
{ {
$user_id_row = $db->sql_fetchrow($result); $user_id_row = $db->sql_fetchrow($result);