Hi I'm doing a little report using subsonic I'm pretty noob And I can't figure how to list only the first record in my report I'm doing something like:
new Select("id,Name,place,group").From(User.Schema)
.InnerJoin(Profile.Schema)
.InnerJoin(userGroup.Schema)
.Where("place")
.IsEqualTo("insomeplace")
.ExecuteReader();
result:
093007 Joe doe insomeplace S2A
093007 Joe doe insomeplace S2A
093007 Joe doe insomeplace S2A
093007 Joe doe insomeplace S2A
I have try to new Select("bla bla").Distinct() new Select("bla bla").Top("1") but none of those appear to work... so what I can do??? any ideas???
When used Top("1") I got a error saying "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 '1user
.id
, user
.Name
, Place, Place
FROM user
' at line 1"
I'm using subsonic 2.x
thanks in advance