Hello All
Any one please guide me. How to use search query used in Wt
Application. I have written the following code.
void WtApplication::hello()
{
root()->addWidget(new WText("Search")); // show some text
nameEdit_ = new WLineEdit(root());
root()->addWidget(new WBreak());
WPushButton *b = new WPushButton("Find", root()); // create a button
b->setMargin(10, Left); // add 5 pixels margin
// insert a line break
greeting_ = new WText( root()); // empty text
b->clicked().connect(this, &WtApplication::populate);
}
void WtApplication::populate() { //fetching
msg("<center><H1></H1></center>","<center><H1></H1></center>","<center><H1></H1></center>","<center><H1></H1></center>","<center><H1></H1></center>");
try {
greeting_->setText( nameEdit_->text());
Transaction tt(session_);
colform collect = session_.find<form>("select * from
test1
where store like '%$nameEdit_%'");
for (colform::const_iterator i =
collect.begin(); i != collect.end(); ++i)
msg((*i)->store,(*i)->name,(*i)->contact,(*i)->intercom,(*i)->stream);
tt.commit();
} catch (...) {}
}
Thanks in Advance
--
Parvinder Rajput
website:- www.parvinder.co.in
------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook
in minutes. BlackBerry App World™ now supports Android™ Apps
for the BlackBerry® PlayBook™. Discover just how easy and simple
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest