php - Extended Zend_Db_Table_Row_Abstract does not return values -
I am quite new to the Zend and its database class. I am having trouble in mapping a Zend_Db_Table_Row_Abstract in my rows The problem is that whenever I try to map it to a class, which is zand_d_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = Extends the abstract class, then database data is no longer accessible. I have not found any errors, trying to get data just turns out zero.
Even my code is:
Jobs:
Expanding class jobs Zend_Db_Table_Abstract {protected $ _name = 'jobs'; Protected $ _rowsetClass = "Job"; Public function getActiveJobs () $ $ Select = $ this- & gt; Select () - & gt; Where ('jobs.jobDateOpen & lt; UNIX_TIMESTAMP ()') - & gt; Border (15,0); $ Rows = $ this- & gt; Get All (select $); Return $ rows; }}
Job:
Class job is expanded Zend_Db_Table_Row_Abstract {public function getCompanyName () {// Company name for this line (Other table ), Just for example}}
Controller:
$ oJobs = new jobs (); $ AActiveJobs = $ oJobs-> GetActiveJobs (); Forex Currency ($ aActiveJobs as $ value) {var_dump ($ value-> JobTitle); }
When I "Remove Safe $ _rowsetClass =" Job ";" Line, so that the table row has not been mapped in my own class, I get the full job titles completely what am I doing here?
Thank you in advance,
Wesley
Code> _rowClass and a _rowsetClass
. Your Job
is expanded Zend_Db_Row_Abstract
but in your Zend_Db_Table_Abstract
you are setting Job
for the rowset class.
class jobs in Zend_Di _ _ _ _ _ _ _ _ = preserved; $ _rowClass = "Work" protected; Public function getActiveJobs () $ $ Select = $ this- & gt; Select () - & gt; Where ('jobs.jobDateOpen & lt; UNIX_TIMESTAMP ()') - & gt; Border (15,0); $ Rows = $ this- & gt; Get All (select $); Return $ rows; }}
Comments
Post a Comment