Search Results

Search found 1568 results on 63 pages for 'zend sklave'.

Page 34/63 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • PHP / Zend Framework: Force prepend table name to column name in result array?

    - by Brian Lacy
    I am using Zend_Db_Select currently to retrieve hierarchical data from several joined tables. I need to be able to convert this easily into an array. Short of using a switch statement and listing out all the columns individually in order to sort the data, my thought was that if I could get the table names auto-prepended to the keys in the result array, that would solve my problem. So considering the following (assembled) SQL: SELECT user.*, contact.* FROM user INNER JOIN contact ON contact.user_id = user.user_id I would normally get a result array like this: [username] => 'bob', [contact_id] => 5, [user_id] => 2, [firstname] => 'bob', [lastname] => 'larsen' But instead I want this: [user.user_id] => 2, [user.username] => 'bob', [contact.contact_id] => 5, [contact.firstname] => 'bob', [contact.lastname] => 'larsen' Does anyone have an idea how to achieve this? Thanks!

    Read the article

  • Zend Framework-Do images, mp3s, scripts, etc, just go in public folder?

    - by Joel
    I guess these are all questions that everyone must just know, because I'm not seeing this in the documentation :-D I understand that the public folder is the folder that the world has access to. I know it is the case with the css folder, but in migrating a traditional php website over, will my /images folder, /js folder /mp3s, etc Will those all just also be public folders that will be accessed via the layout or view.phtml pages? Thanks!

    Read the article

  • Zend Framework question (again) Do images, mp3s, scripts, etc, al just go in public folder?

    - by Joel
    I guess these are all questions that everyone must just know, because I'm not seeing this in the documentation :-D I understand that the public folder is the folder that the world has access to. I know it is the case with the css folder, but in migrating a traditional php website over, will my /images folder, /js folder /mp3s, etc Will those all just also be public folders that will be accessed via the layout or view.phtml pages? Thanks!

    Read the article

  • Extending Zend DB Table to include BETWEEN and LIMIT.

    - by davykiash
    Am looking for how I can extend the Zend_DB_Table below to accomodate a BETWEEN two dates syntax and LIMIT syntax My current construct is class Model_DbTable_Tablelist extends Zend_Db_Table_Abstract { protected $_name = 'mytable'; $select = $this->select() ->setIntegrityCheck(false) ->from('mytable', array('MyCol1', 'MyDate')); } I want it extended to be equivalent to the query below SELECT MyCol1,MyDate FROM mytable WHERE MyDate BETWEEN '2008-04-03' AND '2009-01-02' LIMIT 0,20 Any ideas?

    Read the article

  • How to convert different local float format to standard float format, using zend?

    - by Linto davis
    my local is 'en_IN' (ie Zend_Registry::get('Zend_Locale')) I have to convert the local value to standard float number format for example 1,235.23 = 1235.23 3.23 = 3.23 I have used the following code Zend_Locale_Format::getFloat($value, array('locale' = Zend_Registry::get('Zend_Locale'))); it working fine for 1,235.23, and i get the answer 1235.23. But when i give 3.23 , i get the error on this code And the error shown as 'No localized value in 3.23 found', This issue is happening in the browser opera, when we set the language is English(IN)(en-IN)

    Read the article

  • Zend Framework modular app, can't load models for each module, autoloading models?

    - by EricP
    Is there a way to have models for each module? I have 3 modules, one is a "contacts" module. I created a model for it in modules/contacts/models/Codes.php Codes Controller class Contacts_CodesController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ $this->view->messages = $this->_helper->flashMessenger->getMessages(); } public function indexAction() { $codesTable = new Contacts_Model_Codes(); } Codes Model: class Contacts_Model_Codes extends Zend_Db_Table { protected $_name = 'codes'; } The error I get: Fatal error: Class 'Contacts_Model_Codes' not found in /Applications/MAMP/htdocs/zf_site/application/modules/contacts/controllers/CodesController.php on line 26 thanks

    Read the article

  • How to check what goes wrong in $view->render with Zend Framework?

    - by koko
    Hi, I'm working on a CMS with Widgets. On my localhost the followong code works perfect, but I have no idea what I'm doing wrong ... The neede files exist, I think and I get no error message. As far as I can see, the error occurs in the one before last line of code and I get no error message. $view = new Zend_View(); $view->setScriptPath(APPLICATION_PATH . '/../public/websites/' . My_Cookie::get('alpha_key') . '/views'); $view->headScript()->appendFile($vervang['conf']['jqueryJS']); $view->headLink()->appendStylesheet($vervang['conf']['jqueryCSS']); $view->class = $pluginExtraFinal; $view->vervang = $vervang['data']; $view->moduleName = $moduleName; $parsed = $view->render($vervang['conf']['viewFile']); $inhoud = str_replace($plugin, $parsed, $inhoud); Is there a way to troubleshoot this code? How can I get an error message? What can be wrong? Any suggestions please?

    Read the article

  • Zend Framework: how to remove rendered views in the controller?

    - by takpar
    i want to render one of these sets of views: head body-$id1 foot OR head body-$id2 foot which set exsists. i do it like this: try { $this->render("head"); $this->render("body-$id1"); $this->render("foot"); } catch (Exception $e) { $this->render("head"); $this->render("body-$id2"); $this->render("foot"); } but it causes the head view be rendered twice if body-$id1 does not exists. do you have a better solution? in another saying, may i check the existance of body-$id1 before rendering it?

    Read the article

  • How can I adjust the position of a label for a zend form Radio element?

    - by murze
    Hi, with this piece of code $feOnline = New Zend_Form_Element_Radio('online'); $feOnline->setValue($article->online) ->addMultiOptions(array(0=>'offline', 1=>'online')) ->setLabel('Online'); this html is generated <dd id="online-element"> <label for="online-0"> <input type="radio" checked="checked" value="0" id="online-0" name="online">offline </label><br> <label for="online-1"><input type="radio" value="1" id="online-1" name="online">online </label> </dd> However I don't want the input-tag inside the label-tag. No need for the "" either... What decorators must I add to get this output? <dd id="online-element"> <input type="radio" checked="checked" value="0" id="online-0" name="online"><label for="online-0">offline</label> <input type="radio" value="1" id="online-1" name="online"><label for="online-1">online</label> </dd>

    Read the article

  • How would you go to "design" a cart within a Zend Framework project?

    - by ÉricP
    Hi, I know ZF well, and a little bit of Magento, but I'm new to E-commerce, and I'm sure there are best practice to follow when designing a cart model. How would go to design a cart? I though of two models, Model_Cart and Model_Cart_Item used in conjonction with Zend_Session to store the cart in session. What are your feedbacks? How would you go to do that? What should I know about writing a cart system? Note that I need a simple system, I even don't need to work with quantity

    Read the article

  • how to use multiple $_name using extends Zend_Db_Table_Abstract in zend frame work.

    - by karthik
    we tried to give our tables(users,messages) like this in two different abstract classes but it is not working. This is included in a file childconnect1.php ,is there any relation between the file name(childconnect1.php) and the class(Application_Model_childconnect1). class Application_Model_childconnect1 extends Zend_Db_Table_Abstract { protected $_name = 'users'; public function loginvalidation($username,$pwd) { $row = $this->fetchRow('UserName = \'' . $username . '\'and UserPW = \''. $pwd . '\''); if (!$row) { $msg="invalid"; return $msg; } else { return $row->toArray(); } } } class Application_Model_childconnect2 extends Zend_Db_Table_Abstract { protected $_name = 'messages'; public function replymessage($message) { $data=array( 'MessageText'=>$message ); $this->insert($data); } }

    Read the article

  • Zend Framework-where do calls to my methods go? Controller of Model?

    - by Joel
    Hi guys, I'm confused about exactly what I should have in my controller and what in my method. Specifically, I have this in the action method: public function upcomingshowsAction() { $gcal = $this->_validateCalendarConnection(); $uncleanedFeedArray = $this->_getCalendarFeed($gcal); $finishedFeedArray = $this->_cleanFeed($uncleanedFeedArray); $this->view->googleArray = $finishedFeedArray; } And then (incorrectly I know), I have my methods still in the bottom of my controller. So what I'm wondering, is for those methods in the upcomingshowsAction method, should all the actual methods just be in one model and then I'd have something like this: public function upcomingshowsAction() { $finishedFeedArray = new Application_Model_calendarModelPage(); $this->view->googleArray = $finishedFeedArray; } And then something like this in the model: class Application_Model_CalendarModelPage { $gcal = $this->_validateCalendarConnection(); $uncleanedFeedArray = $this->_getCalendarFeed($gcal); $finishedFeedArray = $this->_cleanFeed($uncleanedFeedArray); public functions { ... ... ... } } Am I on the right track here? Thanks!

    Read the article

  • How to let Zend render a dynamic footer on every page?

    - by koko
    In the app I'm building, I'd like to have a nice footer with data from the database (tags) and a contact-form. All the parts are scripted, but now I'd like to put them all together. The elements of the footer are the same for every page loaded, only the content is different. How can I do this, without having to put too much code on every controller?

    Read the article

  • Does Zend Navigation view helper has a uri integrity check?

    - by simple
    I am kind a confused, though I am using the uri's, it doesn't render child menu items when uri has nonexisting element(madule name||controller name) <tours> <label>Tours</label> <uri>/admin/tour/index/list</uri> <class>admin-main-navigation-item ui-corner-right</class> <pages> <add> <label>Add</label> <uri>/admin/tour/index/form/type/add</uri> </add> <edit> <label>Edit</label> <uri>/admin/tour/index/list</uri> </edit> </pages> </tours> the edit and add item are not rendered because of the "admin" - is a dummy word that I use to distinguish if it is a frontend or backend of the module. any help would be appreciated, thanks

    Read the article

  • Database, Jquery, Ajax and Zend Framework. How to use all togheter?

    - by rasouza
    I have a form rendered in the view which action is setted to the same page /index. <form action="" name="formRegistro" id="formRegistro"> and a JQuery function which is called when the form is submitted $('#formRegistro').submit(function() { // Retrevies data from the form data = $('#someInput').val() //Execute AJAX $.get( 'http://localhost/myproject/', { data }, function(data){ $('#divStatus').html(data); } ); //Prevent page loading return false; }); I'm using and if statement in the IndexController to change between normal view and post view if ($this->_request->isGet()) { and I'd like to output a message in the #divStatus but with I don't know how to do it

    Read the article

  • Where does authentication and loader go in Zend Framework?

    - by Joel
    Hi guys, Still trying to learn the basics of MVC. I'm making use of Zend_Loader for Google Calendar feed. What file would this information go in? The .phtml view? // load library Zend_Loader::loadClass('Zend_Gdata'); Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); Zend_Loader::loadClass('Zend_Gdata_Calendar'); Zend_Loader::loadClass('Zend_Http_Client'); // create authenticated HTTP client for Calendar service $gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; $user = "xxxxxxxxxxxx"; $pass = "xxxxxxxxxxxx"; $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $gcal); $gcal = new Zend_Gdata_Calendar($client); $query = $gcal->newEventQuery(); $query->setUser('xxxxxxxxxxxx'); $secondary=true; $query->setVisibility('private'); $query->setProjection('basic'); $query->setOrderby('starttime'); $query->setSortOrder('ascending'); //$query->setFutureevents('true'); $startDate=date('Y-m-d h:i:s'); $endDate="2015-12-31"; $query->setStartMin($startDate); $query->setStartMax($endDate); $query->setMaxResults(30); try { $feed = $gcal->getCalendarEventFeed($query); } catch (Zend_Gdata_App_Exception $e) { echo "Error: " . $e->getResponse(); } Thanks!

    Read the article

  • Why is Zend Framework (Zend_Db_table) rejecting this SQL Query?

    - by Michael T. Smith
    I'm working on a simple JOIN of two tables (urls and companies). I am using this query call: print $this->_db->select()->from(array('u' => 'urls'), array('id', 'url', 'company_id')) ->join(array('c' => 'companies'), 'u.company_id = c.id'); which is out putting this query: SELECT `u`.`id`, `u`.`url`, `u`.`company_id`, `c`.* FROM `urls` AS `u` INNER JOIN `companies` AS `c` ON u.company_id = c.id Now, I'd prefer the c.* to not actually appear, but either way it doesn't matter. ZF dies with this error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1" but I can run that query perfectly fine in my MySQL CLI. Any ideas how to fix up this query?

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >