Hi,

i faced a problem when using LIMIT clause in select
statement..
select * from Discussion Where ParentID=x Order By
DatePosted Desc LIMIT 1
iam using the above select statement inside a loop
where ParentID varies...
when u run that program, suddenly mysql stopped and
said mysql-opt error ....
then i found out that when there is no record with the
above criteria, it is giving error and mysql stops
abruptly...
when there is no record and if i remove LIMIT clause,
then no problem.. fine...
but i donno when there will be record or when there
won't be as i am running inside loop...
any idea?

Shankar


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus – Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to