Pagina 1 van 1

Search.php error na back-up

Geplaatst: 19 apr 2005, 17:23
door YorickB
Ik heb net mijn forum overgezet naar een nieuwe host, en daar een back-up opgezet van mijn oude host. Alles leek goed to ik naar search.php ging, daar kreeg ik de volgende error:

Code: Selecteer alles

 
Could not obtain forum_name/forum_id

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 't.topic_type DESC,t.topic_status ASC,' at line 4

SELECT c.cat_title, c.cat_id, f.forum_name, f.forum_id FROM xboxfxp_categories c, xboxfxp_forums f WHERE f.cat_id = c.cat_id ORDER BY c.cat_id, f.forum_order t.topic_type DESC,t.topic_status ASC, 

Line : 1295
File : /usr/home/du7667/domains/xboxfxp.com/public_html/search.php 
Ik heb zelf al wat rondgekeken, allee sql tables zijn er en ze zijn ook allemaal gevuld.

Iemand enig idee?

B.v.d
Yorick Bouma

http://83.149.84.137/~du7667/search.php ( http://www.xboxfxp.com/search.php )

Geplaatst: 19 apr 2005, 18:32
door Bee
Er zit een komma achter ASC, dus ook fout in de code.

Geplaatst: 19 apr 2005, 19:22
door YorickB
Bedoel je in de sql of in search.php zelf? Dat het in search.php zelf is lijkt me onlogisch, aangezien ik die niet heb veranderd!

Geplaatst: 19 apr 2005, 19:24
door Bee
Geef lijn 1285 tot 1305 van search.php eens.

Geplaatst: 20 apr 2005, 15:41
door YorickB

Code: Selecteer alles

                );

                $template->pparse('body');

                include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
        }
        else
        {
                message_die(GENERAL_MESSAGE, $lang['No_search_match']);
        }
}

//
// Search forum
//
$sql = "SELECT c.cat_title, c.cat_id, f.forum_name, f.forum_id
        FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f
        WHERE f.cat_id = c.cat_id
        ORDER BY c.cat_id, f.forum_order";
$sql .= ' t.topic_type DESC,t.topic_status ASC, ';

Geplaatst: 20 apr 2005, 15:58
door Paul
verander

Code: Selecteer alles

$sql .= ' t.topic_type DESC,t.topic_status ASC, ';
in

Code: Selecteer alles

$sql .= ' t.topic_type DESC,t.topic_status ASC ';

Geplaatst: 20 apr 2005, 16:55
door YorickB
Nu je het zegt, ik zie dat het op de andere server het ook niet doet...

Bedankt!

EDIT:
Helaas het werkt niet, nu ik het bedenk, volgens mij had ik dit stukje zelf toegevoegd... het staat ook niet in de orginele code van phpbb, iemand nog een idee?

Ik weet het al, dit is de gelockte topics aan de onderkant mod...

Code: Selecteer alles

# 
#-----[ OPEN ]------------------------------------------------ 
# 
search.php 

# 
#-----[ FIND ]------------------------------------------------ 
# 
$sql .= " ORDER BY "; 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Locked at the end MOD
$sql .= ' t.topic_type DESC,t.topic_status ASC, '; 
// End add - Locked at the end MOD
Wat moet ik nu doen?