1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-27 02:05:02 +02:00
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3587 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2003-03-03 20:53:43 +00:00
parent 1f670aa48a
commit b76e7f7022
4 changed files with 28 additions and 6 deletions

View File

@@ -522,6 +522,7 @@ else if ( $search_keywords != '' || $search_author != '' || $search_id )
for ($i = 0; $i < count($search_id_chunks); $i++)
{
$where_sql = ( $search_author == '' && $auth_sql == '' ) ? 'post_id IN (' . implode(', ', $search_id_chunks[$i]) . ')' : 'p.post_id IN (' . implode(', ', $search_id_chunks[$i]) . ')';
$select_sql = ( $search_author == '' && $auth_sql == '' ) ? 'post_id' : 'p.post_id';
$from_sql = ( $search_author == '' && $auth_sql == '' ) ? POSTS_TABLE : POSTS_TABLE . ' p';
if ( $search_time )
@@ -541,7 +542,7 @@ else if ( $search_keywords != '' || $search_author != '' || $search_id )
$where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author'";
}
$sql = "SELECT p.post_id
$sql = "SELECT " . $select_sql . "
FROM $from_sql
WHERE $where_sql";
if ( !($result = $db->sql_query($sql)) )