[odb-users] help! I want to query some line(20 rows) from a table, how to do it ?
qgjie
qgjie at 163.com
Tue Jul 22 03:24:50 EDT 2014
I have define tow object: one is "line" , the other is "FixedLine".
class Line
{
public:
Line() {}
friend class odb::access;
long Line_Id;
char Line_Title[PLATFORM_NAME_STRLEN];
string Line_SubTxt;
int Line_Price;
int Line_VipPrice;
ptime create_Time;
ptime destroy_Time;
shared_ptr<Manage_Admin> admin;
shared_ptr<base_PicClass> pics;
shared_ptr<Line_Town> towns;
};
class FixedLine : public Line
{
public:
FixedLine(int price, int vipprice):Line() {}
private:
FixedLine() {}
friend class odb::access;
int type;
};
Now, I want to query 20 rows from the object FixedLine
How can I implementation?
I known the SQL like this "select type from FixedLine limit 0, 20", but ODB ?
USE VIEW ?
thanks!
More information about the odb-users
mailing list