I have been developing websites in n-tier structure and so far my requirements are fulfilled. But as powerful frameworks like Zend Framework, symphony are getting popular, I wonder how to know if it is time to shift to a framework?
I am in a kind of dilemma? Can anyone suggest me the right option !
...
I have a model which is referenced to a table registries extending Zend_Db and some methods which bascially uses fetchAll() all the time.
What happens is: my table has a DATE field and I'd like it to output already formated when I call $row->reg_date. Is it possible by doing something in the model or do I have to manually format?
...
i want to update multiple rows in DB using Zend Framework(Zend_db).
i want to add 2 to one field of each row
what should i use?
im a beginner to ZF.
...
Hi...related to this question http://stackoverflow.com/questions/405897/zend-form-array-based-elements
$form = new Zend_Form();
$subForm = new Zend_Form_SubForm();
$subForm->addElement('Text', '1')
->addElement('Text', '2');
$form->addSubForm($subForm, 'element');
$var = '1'; $var2 = '2';
echo $form->getSubForm('element')->$var;...
To clearly separate the Controller and View layers, I do not longer want to pass full objects to my views. Instead I want to pass only arrays and objects that contain the data but do not have any methods. Otherwise a view script would be able to delete Doctrine records or traverse in the object tree to data that was not intended for the ...
Hello,
When I call the method findDependentRowset, the returning rowset contains all the rows in the dependent table, and not only the rowsets that matches the reference.
Hoping someone could explain this, since I was of the assumption that findDependentRowset would only return rowset matching my 'rule'?
I have the following DbTable M...
i am installing Zend Framework.i set up all virtual host and virtual domain settings both in WINDOWS and APACHE.
when im gonna run my project , it will display "server not found"
is it because of my firewall?
...
Is it possible to write a Zend View Helper that could present the resultset of any fetchAll() operation as a generic table?.
My model code looks like this
class Model_DbTable_XWZ extends Zend_Db_Table_Abstract
{
protected $_name = 'xwz';
protected $_primary = 'id';
public function getA()
{
$sql = $this->select...
I'm getting an error when trying to include Session.php for the Zend Framework.
Here's how I include it:
$ZEND_LIBRARY_PATH = "path_to_zend_library_folder";
set_include_path( get_include_path() . PATH_SEPARATOR . $ZEND_LIBRARY_PATH);
include_once '../classes/zend/library/zend/Session.php';
$account_info = new Zend_Session_Namespace('a...
I have place model & entry model that entry is parent
everything is fine but how can I delete the result row $categoryPlacements
in place model:
$entryModel = new Model_EntryModel();
$entryRow = $entryModel->find ( $entryId )->current ();
$categoryPlacements = $entryRow->findDependentRowset($this);
in this case i want to delete ...
Hello,
In my init I have:
$contextSwitch = $this->_helper->getHelper('ForceContext');
$contextSwitch->addActionContext('favourite-listing', 'json')->initContext();
In my controller method I have:
public function favouriteListingAction() {
$newValues = array();
if (isset($_POST['Playlist']) && is_array($_POST['...
Hi guys I'm trying to connect to an imap mail server using zend frameworks Zend_Mail_Storage_Imap function. Its working with some accounts but with most accounts it just dies out. I'm connecting using:
$mail = new Zend_Mail_Storage_Imap(array('host' =>$current_dept->incoming_server,
'ssl' =>$current_dept->ssl,
'port'=>$current_dept->inc...
How can I validate (a form element in this case) to ensure that the value is a currency?
Have looked at Zend_Validate_Float.
Needs to check that value is between 0 and 2dp.
Ideally locale-aware (as ZVF is) to allow for locale specific formatting (thousands, decimal as comma/dot)
Would also want to extend to allow/disallow negative val...
ATM i'm manually generating a cache key based on the method name and parameters, then follow to the normal cache pattern. This is all done in the Controller and i'm calling a model class that 'extends Zend_Db_Table_Abstract'.
public function indexAction()
{
$cache = Zend_Registry::get('cache');
$individualleaguekey = sprintf("g...
Hi guys,
So I'm slowly tackling OO and Zend Framework and their MVC process in particular. I have an existing website and web-based calendar application that was designed by me, but coded by a different person and done procedurally.
I understand that it will be very difficult for my application to ever be completely OO without a full...
Hi,
I have a quick question about adding Zend_Dojo_Form into Zend_layouts.
I have a Zend_Dojo_Form that I want to display in the layout that is used for a particular controller. I can add the form to the layout without any issue however the dojo elements fail to render, as they would do if I added the form to a standard view.
Is th...
Is there a simple :) and efficient way or reading very large number of rows sequentially using Zend_Db?
Basically I need to process entire table, row by row. Table is large, primary key sequence is not guaranteed(i.e. not an autoincrement, but is UNSIGNED INT).
What's the best way to approach this?
Environment: PHP 5.2, Zend Framework...
I'm reading the manual here:
http://zendframework.com/manual/en/zend.view.helpers.html
but I'm still confused. I have a script in my head that I'm converting to the layout/view for the Zend MVC:
<script type="text/javascript">
var embedCode = '<object data="http://example.com" type="application/x-shockwave-flash" height="385" width=...
I want to subtract a amount from a table's field in Zend Framework. I can run it with SQL using following query:
UPDATE `Person` SET credit=credit-50 where id=1
But how to write above SQL query in Zend Framework?
...
This is my SQL:
SELECT `tbl`.*, 123 AS `test` FROM `tbl` GROUP BY `test`
It works when I run it directly in MySQL. But PDO says:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'test' in 'field list'
Why so? How to cure this problem? I'm using Zend_Db.
...