in reply to generated SQL statement problem (OT)

select csGroups.ID as groupid,csUsers.UserName as username,csUsers.ID as id,csGroups_lang.Title as grouptitle from csGroups_lang,csUsers,csGroups,csUsers_Groups where csGroups.ID = csGroups_lang.ID and csUsers.ID = csUsers_Groups.UserID and csGroups.ID = csUsers_Groups.GroupID and (id IN (1,2)) order by username asc limit 0,10
My Informix database does not understand the limit 0,10 clause. Indeed, I have been doing SQL for about ten years and I do not recognize that syntax.

I suspect that the mySQL installation that you are using may not recognize it either.

  • Comment on Re: generated SQL statement problem (OT)

Replies are listed 'Best First'.
Re: Re: generated SQL statement problem (OT)
by Albannach (Monsignor) on Jun 22, 2001 at 23:06 UTC
    That is actually legal in MySQL:

    • limit x,y - take the next y rows starting at row x (first row is row 0)
    • limit x - take the first x rows, equivalent to limit 0,x

      --
      I'd like to be able to assign to an luser

Re: Re: generated SQL statement problem (OT)
by Anonymous Monk on Jun 22, 2001 at 22:36 UTC
    I have never seen that either.. I'm 'guessing' they want the top 10 records? If so.. does mySql support a function similar to TOP?