snowboardr
Programmer
I am trying to add a select count inside this sql statement, but i get this error: any ideas?
Jason
[red]Army[/red] : [white]Combat Engineer[/white] : [blue]21B[/blue]
Code:
Microsoft OLE DB Provider for ODBC Drivers error '80040e31'
Operand should contain 1 column(s)
Code:
SELECT
post.pid,
post.ptid,
post.ptid2,
post.puid,
post.psubject,
post.ptype,
post.preplycount,
post.ptime,
post.psticky,
post.ptimereply, (SELECT count(cpost.pid), cpost.preplyid FROM forumpost as cpost WHERE cpost.preplyid=post.pid group by cpost.preplyid) as replycount,
user.uid,
user.uname,
thread.tid,
thread.tname
FROM forumpost as post, users as user, thread WHERE user.uid=post.puid AND post.ptype=0 AND ptid=1 AND ptid2=2 AND thread.tid=2 Order by post.psticky DESC,post.pid DESC Limit 10
Jason
[red]Army[/red] : [white]Combat Engineer[/white] : [blue]21B[/blue]