unexpected T_LNUMBER error in query.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Brad.loo
Forum Newbie
Posts: 2
Joined: Mon Aug 25, 2003 3:23 am

unexpected T_LNUMBER error in query.

Post 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 :)
Brad.loo
Forum Newbie
Posts: 2
Joined: Mon Aug 25, 2003 3:23 am

Post by Brad.loo »

Nevermind I figured it out, using '' when I shouldent ;). Thanks anyway :).
Post Reply