querry data with directFetch

13 views
Skip to first unread message

trungnq

unread,
Jul 11, 2012, 12:33:00 PM7/11/12
to openbi...@googlegroups.com
 I wanna querry data,I read in example and know the way:
   $HostObj = BizSystem::getObject("Pigs.Host.do.HostDO");
   $host = $HostObj->directFetch("[idPerson]='".$idPerson."'",1);
 with $idPerson knew.
   now,I get data with the way: $host[0]['idHost']
 But,when I try,I don't get data athought database have that data.
 I hope the help from everyone.
 Thanks very much.

Openbiz.me

unread,
Jul 11, 2012, 6:53:54 PM7/11/12
to openbi...@googlegroups.com, openbi...@googlegroups.com
If you want to query on id, you can use fetchById method. Other methods like fetchOne, fetchByName is handy as well.

Your syntax on directFetch looks ok. Can you check the SQL by turning on DEBUG?

Sent from my iPhone

trungnq

unread,
Jul 11, 2012, 11:34:45 PM7/11/12
to openbi...@googlegroups.com
I have done this but not get data.
Have other ways to get data ?
Hope the help.
thanks

Rocky Swen

unread,
Jul 12, 2012, 1:36:33 AM7/12/12
to openbi...@googlegroups.com
Can you dump you SQL query statement corresponding the directFetch method and find out the cause?
Reply all
Reply to author
Forward
0 new messages