Formatting shouldn't be an issue if you entered the query exactly as you
said you did. However, I'm a little dubious that you did; the error message
seems to be saying that you have a negative sign in front of the first 1 in
the Limit clause.

Check your typing and try the query again. Also, remember that the row
numbers used by the Limit clause start with 0, not with 1. In other words,
you may want to try "Limit 0,1", not "Limit 1,1".

Rhino

----- Original Message ----- 
From: "Stuart Felenstein" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 02, 2004 12:18 PM
Subject: Re: After I went searching


> The query works fine on it's own, but generates a SQL
> error in my page:
>
> SELECT *
> FROM MemberRez
> WHERE LurkID=colname (I've tried it without this line)
> ORDER BY andnext asc limit 1,1
>
> andnext is the pk auto inc.
>
> Page error:
> You have an error in your SQL syntax. Check the manual
> that corresponds to your MySQL server version for the
> right syntax to use near 'LIMIT -1' at line 1
>
> Maybe formatting ?
> Stuart
>
>
>
>
> --- Stuart Felenstein <[EMAIL PROTECTED]> wrote:
>
> > Wait!!!!!!!!!!!!!! Don't answer...it's that LIMIT
> > thing.
> >
> >
> > :)
> > Stuart
> >
> >
> > --- Stuart Felenstein <[EMAIL PROTECTED]> wrote:
> >
> > > I'm tring to extract all records belonging to one
> > ID
> > > in a table.
> > > BUT! I want to do it in piece meal.  Meaning a
> > > record
> > > at a time.
> > > I am assuming I need some kind of count mechanism.
> > >
> > > Example:
> > > I want to see the first 3 purchases this member
> > > made.
> > > Instead of grabbing them all in one shot, I want
> > to
> > > break  those 3 out in 3 seperate results set
> > >
> > > Results Set1: Purchase 1
> > > Results Set2: Purchase 2
> > > Results Set3: Purchase 3
> > >
> > > This is probably easy.
> > >
> > > Thank you,
> > > Stuart
> > >
> > > -- 
> > > MySQL General Mailing List
> > > For list archives: http://lists.mysql.com/mysql
> > > To unsubscribe:
> > >
> >
> http://lists.mysql.com/[EMAIL PROTECTED]
> > >
> > >
> >
> >
> > -- 
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> >
> http://lists.mysql.com/[EMAIL PROTECTED]
> >
> >
>
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to