PDA

View Full Version : Getting 404 error with small codechange?


Koutaru
07-24-2004, 06:47 AM
It's very strange and I can't figure out why it's doing this but...

[PHP]
$fiction = $DB_site->query_first("SELECT fiction.*, fictionpost.*, fictioncategory.options AS categoryoptions FROM " . TABLE_PREFIX . "fiction AS fiction
INNER JOIN " . TABLE_PREFIX . "fictionpost AS fictionpost ON(fictionpost.postid = fiction.firstpostid)
INNER JOIN " . TABLE_PREFIX . "fictioncategory AS fictioncategory ON(fictioncategory.categoryid = fiction.categoryid)
WHERE fictionpost.fictionid = $a AND fictionpost.type=1 AND fictionpost.chapter=0
");
[PHP]

If I take out the fictionpost.chapter=0 it works fine but with it, it displays a 404 error. Is it not getting any results or what? ?_? And btw, there IS a field called chapter in fictionpost

Koutaru
07-24-2004, 08:27 AM
It's very strange and I can't figure out why it's doing this but...

[PHP]
$fiction = $DB_site->query_first("SELECT fiction.*, fictionpost.*, fictioncategory.options AS categoryoptions FROM " . TABLE_PREFIX . "fiction AS fiction
INNER JOIN " . TABLE_PREFIX . "fictionpost AS fictionpost ON(fictionpost.postid = fiction.firstpostid)
INNER JOIN " . TABLE_PREFIX . "fictioncategory AS fictioncategory ON(fictioncategory.categoryid = fiction.categoryid)
WHERE fictionpost.fictionid = $a AND fictionpost.type=1 AND fictionpost.chapter=0
");
[PHP]

If I take out the fictionpost.chapter=0 it works fine but with it, it displays a 404 error. Is it not getting any results or what? ?_? And btw, there IS a field called chapter in fictionpost
Ah nevermind, solved it. Stupid error of mine and omg I am so tired. o_o -.- it's because the ON(fictionpost.postid = fiction.firstpostid) wasn't true and wasn't giving results