Page 1 of 1

unexpected T_LNUMBER error in query.

Posted: Mon Aug 25, 2003 3:23 am
by Brad.loo
Any idea what might be wrong with this sql query? (using mySQL). The line throwing the error is in bold.
$sql_news = mysql_query('SELECT thread.threadid, thread.title, thread.forumid, thread.firstpostid, thread.lastpost, thread.dateline, thread.postusername, thread.postuserid, thread.replycount as commentcount, thread.iconid, thread.lastposter as newscommentname, avatar.avatarpath, NOT ISNULL(customavatar.avatardata) AS hascustomavatar, customavatar.dateline AS avatardateline, post.pagetext as newstext, icon.title as icontitle, icon.iconpath as iconpath
FROM thread
LEFT JOIN post ON(thread.firstpostid = post.postid)
LEFT JOIN user ON(thread.postuserid = user.userid)
LEFT JOIN avatar ON(user.avatarid = avatar.avatarid)
LEFT JOIN customavatar ON(user.userid = customavatar.userid)
LEFT JOIN icon ON(icon.iconid = thread.iconid)
WHERE (thread.forumid = '1' AND thread.open='1')
ORDER BY thread.dateline DESC LIMIT 5');
Thanks :)

Posted: Mon Aug 25, 2003 3:39 am
by Brad.loo
Nevermind I figured it out, using '' when I shouldent ;). Thanks anyway :).