Search Results

Search found 13591 results on 544 pages for 'zend date'.

Page 1/544 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to use jQuery Date Range Picker plugin in asp.net

    - by alaa9jo
    I stepped by this page: http://www.filamentgroup.com/lab/date_range_picker_using_jquery_ui_16_and_jquery_ui_css_framework/ and let me tell you,this is one of the best and coolest daterangepicker in the web in my opinion,they did a great job with extending the original jQuery UI DatePicker.Of course I made enhancements to the original plugin (fixed few bugs) and added a new option (Clear) to clear the textbox. In this article I well use that updated plugin and show you how to use it in asp.net..you will definitely like it. So,What do I need? 1- jQuery library : you can use 1.3.2 or 1.4.2 which is the latest version so far,in my article I will use the latest version. 2- jQuery UI library (1.8): As I mentioned earlier,daterangepicker plugin is based on the original jQuery UI DatePicker so that library should be included into your page. 3- jQuery DateRangePicker plugin : you can go to the author page or use the modified one (it's included in the attachment),in this article I will use the modified one. 4- Visual Studio 2005 or later : very funny :D,in my article I will use VS 2008. Note: in the attachment,I included all CSS and JS files so don't worry. How to use it? First thing,you will have to include all of the CSS and JS files into your page like this: <script src="Scripts/jquery-1.4.2.min.js" type="text/javascript"></script> <script src="Scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"></script> <script src="Scripts/daterangepicker.jQuery.js" type="text/javascript"></script> <link href="CSS/redmond/jquery-ui-1.8.custom.css" rel="stylesheet" type="text/css" /> <link href="CSS/ui.daterangepicker.css" rel="stylesheet" type="text/css" /> <style type="text/css"> .ui-daterangepicker { font-size: 10px; } </style> Then add this html: <asp:TextBox ID="TextBox1" runat="server" Font-Size="10px"></asp:TextBox><asp:Button ID="SubmitButton" runat="server" Text="Submit" OnClick="SubmitButton_Click" /> <span>First Date:</span><asp:Label ID="FirstDate" runat="server"></asp:Label> <span>Second Date:</span><asp:Label ID="SecondDate" runat="server"></asp:Label> As you can see,it includes TextBox1 which we are going to attach the daterangepicker to it,2 labels to show you later on by code on how to read the date from the textbox and set it to the labels Now we have to attach the daterangepicker to the textbox by using jQuery (Note:visit the author's website for more info on daterangerpicker's options and how to use them): <script type="text/javascript"> $(function() { $("#<%= TextBox1.ClientID %>").attr("readonly", "readonly"); $("#<%= TextBox1.ClientID %>").attr("unselectable", "on"); $("#<%= TextBox1.ClientID %>").daterangepicker({ presetRanges: [], arrows: true, dateFormat: 'd M, yy', clearValue: '', datepickerOptions: { changeMonth: true, changeYear: true} }); }); </script> Finally,add this C# code: protected void SubmitButton_Click(object sender, EventArgs e) { if (TextBox1.Text.Trim().Length == 0) { return; } string selectedDate = TextBox1.Text; if (selectedDate.Contains("-")) { DateTime startDate; DateTime endDate; string[] splittedDates = selectedDate.Split("-".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); if (splittedDates.Count() == 2 && DateTime.TryParse(splittedDates[0], out startDate) && DateTime.TryParse(splittedDates[1], out endDate)) { FirstDate.Text = startDate.ToShortDateString(); SecondDate.Text = endDate.ToShortDateString(); } else { //maybe the client has modified/altered the input i.e. hacking tools } } else { DateTime selectedDateObj; if (DateTime.TryParse(selectedDate, out selectedDateObj)) { FirstDate.Text = selectedDateObj.ToShortDateString(); SecondDate.Text = string.Empty; } else { //maybe the client has modified/altered the input i.e. hacking tools } } } This is the way on how to read from the textbox,That's it!. FAQ: 1-Why did you add this code?: <style type="text/css"> .ui-daterangepicker { font-size: 10px; } </style> A:For two reasons: 1)To show the Daterangepicker in a smaller size because it's original size is huge 2)To show you how to control the size of it. 2- Can I change the theme? A: yes you can,you will notice that I'm using Redmond theme which you will find it in jQuery UI website,visit their website and download a different theme,you may also have to make modifications to the css of daterangepicker,it's all yours. 3- Why did you add a font size to the textbox? A: To make the design look better,try to remove it and see by your self. 4- Can I register the script at codebehind? A: yes you can 5- I see you have added these two lines,what they do? $("#<%= TextBox1.ClientID %>").attr("readonly", "readonly"); $("#<%= TextBox1.ClientID %>").attr("unselectable", "on"); A:The first line will make the textbox not editable by the user,the second will block the blinking typing cursor from appearing if the user clicked on the textbox,you will notice that both lines are necessary to be used together,you can't just use one of them...for logical reasons of course. Finally,I hope everyone liked the article and as always,your feedbacks are always welcomed and if anyone have any suggestions or made any modifications that might be useful for anyone else then please post it at at the author's website and post a reference to your post here.

    Read the article

  • Zend Framework - Zend Tool - Module error: I have error after I create module with Zend Tool

    - by Yosef
    Hi, I new in zend framework. I create zend project with zend tool and its works , but i create module and when i try access him with browser I get Error. I write my steps, please help me. Thanks, Yosef My steps: $ sudo zf create project mystore put Zend library inside library test: http://localhost/mystore/public/ (working) Add module store (not working) $ sudo zf create module store add to application.ini path to modules resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.modules = "" test1: http://localhost/mystore/public/store/ test2: http://localhost/mystore/public/store/public/ test3: http://localhost/mystore/public/modules/store/public/ test1+2+3 result: An error occurred Page not found Exception information: Message: Invalid controller specified (index.php) Stack trace: #0 /var/www/mystore/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 /var/www/mystore/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch() #2 /var/www/mystore/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() #3 /var/www/mystore/public/index.php(25): Zend_Application->run() #4 {main} Request Parameters: array ( 'module' => 'store', 'controller' => 'index.php', 'action' => 'index', )

    Read the article

  • Stupid Geek Tricks: How to Perform Date Calculations in Windows Calculator

    - by Usman
    Would you like to know how many days old are you today? Can you tell what will be the date 78 days from now? How many days are left till Christmas? How many days have passed since your last birthday? All these questions have their answers hidden within Windows! Curious? Keep reading to see how you can answer these questions in an instant using Windows’ built-in utility called ‘Calculator’. No, no. This isn’t a guide to show you how to perform basic calculations on calculator. This is an application of a unique feature in the Calculator application in Windows, and the feature is called Date Calculation. Most of us don’t really use the Windows’ Calculator that much, and when we do, it’s only for an instant (to do small calculations). However, it is packed with some really interesting features, so lets go ahead and see how Date Calculation works. To start, open Calculator by pressing the winkey, and type calcul… (it should’ve popped up by now, if not, you can type the rest of the ‘…ator’ as well just to be sure). Open it. And by the way, this date calculation function works in both Windows 7 and 8. Why Does 64-Bit Windows Need a Separate “Program Files (x86)” Folder? Why Your Android Phone Isn’t Getting Operating System Updates and What You Can Do About It How To Delete, Move, or Rename Locked Files in Windows

    Read the article

  • Zend Pdf generation from an action

    - by Nisanth
    Hi all, I have a controller Employee , in that i have the action detail . The detail action prints like the attached image. Suppose there is a save pdf button, i need to print this page as .pdf.. How can i do this ? Pls help me Thanks in advance Nisanth

    Read the article

  • Encoding Problem with Zend Navigation using Zend Translate Spanish in XMLTPX File Special Characters

    - by Routy
    Hello, I have been attempting to use Zend Translate to display translated menu items to the user. It works fine until I introduce special characters into the translation files. I instantiate the Zend_Translate object in my bootstrap and pass it in as a translator into Zend_Navigation: $translate = new Zend_Translate( array('adapter' => 'tmx', 'content' => APPLICATION_PATH .'/languages/translation.tmx', 'locale' => 'es' ) ); $navigation->setUseTranslator($translate); I have used several different adapters (array,tmx) in order to see if that made a difference. I ended up with a TMX file that is encoded using ISO-8859-1 (otherwise that throws an XML parse error when introducing the menu item "Administrar Applicación". <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE tmx SYSTEM "tmx14.dtd"> <tmx version="1.4"> <header creationtoolversion="1.0.0" datatype="tbx" segtype="sentence" adminlang="en" srclang="en" o-tmf="unknown" creationtool="XYZTool" > </header> <body> <tu tuid='link_signout'> <tuv xml:lang="en"><seg>Sign Out</seg></tuv> <tuv xml:lang="es"><seg>Salir</seg></tuv> </tu> <tu tuid='link_signin'> <tuv xml:lang="en"><seg>Login</seg></tuv> <tuv xml:lang="es"><seg>Acceder</seg></tuv> </tu> <tu tuid='Manage Application'> <tuv xml:lang="en"><seg>Manage Application</seg></tuv> <tuv xml:lang="es"><seg>Administrar Applicación</seg></tuv> </tu> </body> </tmx> Once I display the menu in the layout: echo $this->navigation()->menu(); It will display all menu items just fine, EXCEPT the one using special characters. It will simply be blank. NOW - If I use PHP's UTF8-encode inside of the zend framework class 'Menu' which I DO NOT want to do: Line 215 in Zend_View_Helper_Navigation_Menu: if ($this->getUseTranslator() && $t = $this->getTranslator()) { if (is_string($label) && !empty($label)) { $label = utf8_encode($t->translate($label)); } if (is_string($title) && !empty($title)) { $title = utf8_encode($t->translate($title)); } } Then it works. The menu item display correctly and all is joyful. The thing is, I do not want to modify the library. Is there some kind of an encoding setting in either zend translate or zend navigation that I am not finding? Please Help! Zend Library Version: 1.11

    Read the article

  • Get all model details in zend.

    - by Prasanth P
    Hi, I have one doubt in zend framework. I need all model details from project which i have done in zend framework. Is there any possibility to get all model details in zend framework. Please help me.. Thanks and regards, Prasanth P

    Read the article

  • Installing Zend on CentOS is having dependency issues

    - by rax
    I'm trying to install PHP's Zend Server on my CentOS VPS but it's having dependency issues that I can't seem to resolve. zend-server-php-5.2-4.0-73.noarch from Zend_noarch has depsolving problems --> Missing Dependency: php-5.2-gui-zend-server is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) zend-server-php-5.2-4.0-73.noarch from Zend_noarch has depsolving problems --> Missing Dependency: php-5.2-dev-zend-server is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) knowledgetree-ce-3.7.0-2.noarch from KTnoarch has depsolving problems --> Missing Dependency: php-5.2-xmlrpc-zend-server is needed by package knowledgetree-ce-3.7.0-2.noarch (KTnoarch) knowledgetree-ce-3.7.0-2.noarch from KTnoarch has depsolving problems --> Missing Dependency: php-5.2-fileinfo-zend-server is needed by package knowledgetree-ce-3.7.0-2.noarch (KTnoarch) zend-server-php-5.2-4.0-73.noarch from Zend_noarch has depsolving problems --> Missing Dependency: php-5.2-zend-extensions is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) zend-server-php-5.2-4.0-73.noarch from Zend_noarch has depsolving problems --> Missing Dependency: php-5.2-common-extensions-zend-server is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) Error: Missing Dependency: php-5.2-fileinfo-zend-server is needed by package knowledgetree-ce-3.7.0-2.noarch (KTnoarch) Error: Missing Dependency: php-5.2-xmlrpc-zend-server is needed by package knowledgetree-ce-3.7.0-2.noarch (KTnoarch) Error: Missing Dependency: php-5.2-gui-zend-server is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) Error: Missing Dependency: php-5.2-common-extensions-zend-server is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) Error: Missing Dependency: php-5.2-dev-zend-server is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) Error: Missing Dependency: php-5.2-zend-extensions is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) When consulting the Google, all I get told is how to install PHP 5.2.* on CentOS. According to the output of php -v, I've done that. PHP 5.2.8 (cli) (built: Sep 28 2009 15:37:15) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies with the ionCube PHP Loader v3.1.34, Copyright (c) 2002-2009, by ionCube Ltd. How can I solve this issue?

    Read the article

  • Installing Zend on CentOS is having dependency issues

    - by rax
    I'm trying to install PHP's Zend Server on my CentOS VPS but it's having dependency issues that I can't seem to resolve. zend-server-php-5.2-4.0-73.noarch from Zend_noarch has depsolving problems --> Missing Dependency: php-5.2-gui-zend-server is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) zend-server-php-5.2-4.0-73.noarch from Zend_noarch has depsolving problems --> Missing Dependency: php-5.2-dev-zend-server is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) knowledgetree-ce-3.7.0-2.noarch from KTnoarch has depsolving problems --> Missing Dependency: php-5.2-xmlrpc-zend-server is needed by package knowledgetree-ce-3.7.0-2.noarch (KTnoarch) knowledgetree-ce-3.7.0-2.noarch from KTnoarch has depsolving problems --> Missing Dependency: php-5.2-fileinfo-zend-server is needed by package knowledgetree-ce-3.7.0-2.noarch (KTnoarch) zend-server-php-5.2-4.0-73.noarch from Zend_noarch has depsolving problems --> Missing Dependency: php-5.2-zend-extensions is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) zend-server-php-5.2-4.0-73.noarch from Zend_noarch has depsolving problems --> Missing Dependency: php-5.2-common-extensions-zend-server is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) Error: Missing Dependency: php-5.2-fileinfo-zend-server is needed by package knowledgetree-ce-3.7.0-2.noarch (KTnoarch) Error: Missing Dependency: php-5.2-xmlrpc-zend-server is needed by package knowledgetree-ce-3.7.0-2.noarch (KTnoarch) Error: Missing Dependency: php-5.2-gui-zend-server is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) Error: Missing Dependency: php-5.2-common-extensions-zend-server is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) Error: Missing Dependency: php-5.2-dev-zend-server is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) Error: Missing Dependency: php-5.2-zend-extensions is needed by package zend-server-php-5.2-4.0-73.noarch (Zend_noarch) When consulting the Google, all I get told is how to install PHP 5.2.* on CentOS. According to the output of php -v, I've done that. PHP 5.2.8 (cli) (built: Sep 28 2009 15:37:15) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies with the ionCube PHP Loader v3.1.34, Copyright (c) 2002-2009, by ionCube Ltd. How can I solve this issue?

    Read the article

  • ZF2 Zend\Db Insert/Update Using Mysql Expression (Zend\Db\Sql\Expression?)

    - by Aleross
    Is there any way to include MySQL expressions like NOW() in the current build of ZF2 (2.0.0beta4) through Zend\Db and/or TableGateway insert()/update() statements? Here is a related post on the mailing list, though it hasn't been answered: http://zend-framework-community.634137.n4.nabble.com/Zend-Db-Expr-and-Transactions-in-ZF2-Db-td4472944.html It appears that ZF1 used something like: $data = array( 'update_time' => new \Zend\Db\Expr("NOW()") ); And after looking through Zend\Db\Sql\Expression I tried: $data = array( 'update_time' => new \Zend\Db\Sql\Expression("NOW()"), ); But get the following error: Catchable fatal error: Object of class Zend\Db\Sql\Expression could not be converted to string in /var/www/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Statement.php on line 256 As recommended here: http://zend-framework-community.634137.n4.nabble.com/ZF2-beta3-Zend-Db-Sql-Insert-new-Expression-now-td4536197.html I'm currently just setting the date with PHP code, but I'd rather use the MySQL server as the single source of truth for date/times. $data = array( 'update_time' => date('Y-m-d H:i:s'), ); Thanks, I appreciate any input!

    Read the article

  • Zend Framework, Zend_Form_Element how to set custom name?

    - by ikso
    Hello, I have form, where some fields are looks like rows, so I can add/delete them using JS. For example: Field with ID=1 (existing row) <input id="id[1]" type="text" name="id[1]" value="1" /> <input id="name[1]" type="text" name="name[1]" value="100" /> Field with ID=2 (existing row) <input id="name[2]" type="text" name="name[2]" value="200" /> <input id="name[2]" type="text" name="name[2]" value="200" /> new row created by default (to allow add one more row to existing rows) <input id="id[n0]" type="text" name="id[n0]" value="" /> <input id="name[n0]" type="text" name="name[n0]" value="" /> new row created by JS <input id="id[n1]" type="text" name="id[n1]" value="" /> <input id="name[n1]" type="text" name="name[n1]" value="" /> So than we will proceed form, we will know what rows to update and what to add (if index starts with "n" - new, if index is number - existent element). I tried subforms... but do I have to create subform for each field? If I use following code: $subForm = new Zend_Form_SubForm(); $subForm->addElement('Text', 'n0'); $this->addSubForm($subForm, 'pid'); $subForm = new Zend_Form_SubForm(); $subForm->addElement('Text', 'n0'); $this->addSubForm($subForm, 'name'); What is the best way for this? 1) Use subforms? 2) Extend Zend/Form/Decorator/ViewHelper.php to use names like name[nX]? 3) Other solutions? Thanks.

    Read the article

  • How to set up Hierarchical Zend Rest Routes?

    - by Kenji Baheux
    With the Zend Framework, I am trying to build routes for a REST api on resources organized in the following pattern: http://example.org/users/ http://example.org/users/234 http://example.org/users/234/items http://example.org/users/234/items/34 How do I set up this with Zend_Rest_Route? Here is how I have setup the route for the users resource (users/:id) in my bootstrap.php file: $this->bootstrap('frontController'); $frontController = Zend_Controller_Front::getInstance(); $restRoute = new Zend_Rest_Route($frontController); $frontController->getRouter()->addRoute('default', $restRoute); [As far as I understand, this is a catch all route so users/324/items/34 would results in parameters set as id=324 and items=34 and everything would be mapped to the Users (front module) Model. From there I guess I could just test for the items parameter and retrieve the item #34 for user #324 on a get request.]<=== I just checked it and it doesn't seems to work like that: Acessing /users/234/items/43 and var_dump($this->_getAllParams()); in the get action of the rest controller results in the following output: array(4) { ["controller"]=> string(5) "users" ["action"]=> string(3) "get" [2]=> string(5) "items" ["module"]=> string(7) "default"] } Somehow both ids got lost... Anyone?

    Read the article

  • Zend Form, table decorators

    - by levacjeep
    Hello, I am having an incredibly difficult time to decorate a Zend form the way I need to. This is the HTML structure I am in need of: <table> <thead><tr><th>one</th><th>two</th><th>three</th><th>four</th></thead> <tbody> <tr> <td><input type='checkbox' id='something'/></td> <td><img src='src'/></td> <td><input type='text' id='something'/></td> <td><input type='radio' group='justonegroup'/></td> </tr> <tr> <td><input type='checkbox' id='something'/></td> <td><img src='src'/></td> <td><input type='text' id='something'/></td> <td><input type='radio' group='justonegroup'/></td> </tr> </tbody> </table> The number of rows in the body is determined by my looping structure inside my form class. All ids will be unique of course. All radio buttons in the form belongs to one group. My issue really is that I am unsure how to create and then style the object Zend_Form_Element_MultiCheckbox and Zend_Form_Element_Radio inside my table. Where/how would I apply the appropriate decoraters to the checkboxes and radio buttons to have a form structure like above? My Form class so far: class Form_ManageAlbums extends Zend_Form { public function __construct($album_id) { $photos = Model_DbTable_Photos::getAlbumPhotos($album_id); $selector = new Zend_Form_Element_MultiCheckbox('selector'); $radio = new Zend_Form_Element_Radio('group'); $options = array(); while($photo = $photos->fetchObject()) { $options[$photo->id] = ''; $image = new Zend_Form_Element_Image('image'.$photo->id); $image->setImageValue('/dog/upload/'.$photo->uid.'/photo/'.$photo->src); $caption = new Zend_Form_Element_Text('caption'.$photo->id); $caption->setValue($photo->caption); $this->addElements(array($image, $caption)); } $selector->addMultiOptions($options); $radio->addMultiOptions($options); $this->addElement($selector); $this->setDecorators(array( 'FormElements', array('HtmlTag', array('tag' => 'table')), 'Form' )); } } I have tried a few combination of decoraters for the td and tr, but no success to date. Thank you for any help, very appreciated. JP Levac

    Read the article

  • Zend Date -- day difference

    - by Nisanth
    Hi All, I have the below line of codes $day1 = new Zend_Date('2010-03-01', 'YYYY-mm-dd'); $day2 = new Zend_Date('2010-03-05', 'YYYY-mm-dd'); $dateDiff = $day2->getDate()->get(Zend_Date::TIMESTAMP) - $day1->getDate()->get(Zend_Date::TIMESTAMP); $days = floor((($dateDiff / 60) / 60) / 24); return $days; this will return 4 But if gave $day1 = new Zend_Date('2010-02-28', 'YYYY-mm-dd'); $day2 = new Zend_Date('2010-03-01', 'YYYY-mm-dd'); $dateDiff = $day2->getDate()->get(Zend_Date::TIMESTAMP) - $day1->getDate()->get(Zend_Date::TIMESTAMP); $days = floor((($dateDiff / 60) / 60) / 24); return $days; it will return -27 .. how will i get right answer

    Read the article

  • Zend Studio Intellisense + zend Framework

    - by Ilya Biryukov
    Hi. I've got a very annoying problem with my Zend studio. I have a zend framework project I am working on. The actual zend framework code is inside my project (in library folder) and then ZS seems to reference to its own version of zend framework. As the result, I get 2 versions of the same function/class in my intellisense which is annoying to say the least. Today I had the last drop of patience with zend studio when I showed 4 copies of the same class (imagine what's its like looking at a large namespace times 4!). So, how do I remove all references inside ZS to its own version of ZF? Thanks!

    Read the article

  • Zend Framework: How to include an OR statement in an SQL fetchAll()

    - by Scoobler
    I am trying to build the following SQL statement: SELECT users_table.*, users_data.first_name, users_data.last_name FROM users_table INNER JOIN users_data ON users_table.id = user_id WHERE (users_table.username LIKE '%sc%') OR (users_data.first_name LIKE '%sc%') OR (users_data.last_name LIKE '%sc%') I have the following code at the moment: public function findAllUsersLike($like) { $select = $this-select(Zend_Db_Table::SELECT_WITH_FROM_PART)-setIntegrityCheck(false); $select-where('users_table.username LIKE ?', '%'.$like.'%'); $select-where('users_data.first_name LIKE ?', '%'.$like.'%'); $select-where('users_data.last_name LIKE ?', '%'.$like.'%'); $select-join('users_data', 'users_table.id = user_id', array('first_name', 'last_name')); return $this-fetchAll($select); } This is close, but not right as it uses AND to add the extra WHERE statements, instead of OR. Is there any way to do this as one select? Or should I perform 3 selects and combine the results (alot more overhead?)? P.S. The parameter $like that is past is sanitized so don't need to wory about user input in the code above!

    Read the article

  • One-to-many relationship in the same table in zend

    - by Behrang
    I have groupTable(group_id,group_name,group_date,group_parent_id) in face each group have many group child I create groupModel and I want to begin coding is this right code to handle protected $_name = 'group'; protected $_dependentTables = array('Model_group'); protected $_referenceMap = array('Model_group' = array('columns' = array('group_parent_id') , 'refTableClass' = 'Model_group' , 'refColumns' = array('group_id') , 'onDelete' = self::CASCADE , 'onUpdate' = self::RESTRICT) );

    Read the article

  • Create new framework project in Zend Studio

    - by Sadee
    I hv problem in creating New Framework project on Zend Studio.I'm new to Zend Studio. Using Zend Studio ver.7.1.0. When i'm creating new zend framwork project (Zend Server is successfully installed), It will not create 'application' & 'public' folders. In my previous test project those were created automatically. But now its create only - Javascript Resources - PHP Include Path - PHP Language Library :( Some can help me? Thanx! Sadee

    Read the article

  • EXSLT date:format-date template without document() XSLT 1.0

    - by DashaLuna
    Hello guys, I'm using date:format-date template EXSLT file I'm using XSLT 1.0 and MSXML3.0 as the processor. My date:format-date template EXSLT file's declaration is: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:tui="http://www.travelbound.co.uk/" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="msxsl tui date" version="1.0"> ... </xsl:stylesheet> I cannot use document() function due to the 3rd party restrictions. So I have changed the months and days (similarly) from XML snippet: <date:months> <date:month length="31" abbr="Jan">January</date:month> <date:month length="28" abbr="Feb">February</date:month> <date:month length="31" abbr="Mar">March</date:month> <date:month length="30" abbr="Apr">April</date:month> <date:month length="31" abbr="May">May</date:month> <date:month length="30" abbr="Jun">June</date:month> <date:month length="31" abbr="Jul">July</date:month> <date:month length="31" abbr="Aug">August</date:month> <date:month length="30" abbr="Sep">September</date:month> <date:month length="31" abbr="Oct">October</date:month> <date:month length="30" abbr="Nov">November</date:month> <date:month length="31" abbr="Dec">December</date:month> </date:months> to the variable: <xsl:variable name="months"> <month length="31" abbr="Jan">January</month> <month length="28" abbr="Feb">February</month> <month length="31" abbr="Mar">March</month> <month length="30" abbr="Apr">April</month> <month length="31" abbr="May">May</month> <month length="30" abbr="Jun">June</month> <month length="31" abbr="Jul">July</month> <month length="31" abbr="Aug">August</month> <month length="30" abbr="Sep">September</month> <month length="31" abbr="Oct">October</month> <month length="30" abbr="Nov">November</month> <month length="31" abbr="Dec">December</month> </xsl:variable> And correspondingly, I've changed the code that originally uses document() function from: [from month processing bit of EXSLT stylesheet] <xsl:variable name="month-node" select="document('')/*/date:months/date:month[number($month)]" /> to use MSXML3.0 node-set function: <xsl:variable name="month-node" select="msxsl:node-set($months)/month[number($month)]" /> So I assumed that this would work. According to the EXLT instructions "The format pattern string is interpreted as described for the JDK 1.1 SimpleDateFormat class." [I used current version]. I'm specifing the month in accordance to SimpleDateFormat class as 'dd MMMMM yyyy' so that the month will be the full month's name, for example January. But it doesn't work :( I've looked in EXSLT stylesheet and it has got the logic to do that. Also there is logic to display the name of the week for a day using 'E' pattern, which doesn't work for me. Maybe changing from using document() to variables broke it. Would really appreciate any help. Many thanks!

    Read the article

  • Zend Studio Debugger returns Application Error

    - by Keyne
    When I run debug for my public/index.php I got an application error as output. I've seen that it occurs at this line: foreach($feed->findFeedEntries($entriesLimit) as $entry) If I put a breakpoint before this, all works as expected, I mean, the error is after the line above. If I remove findFeedEntries() method, I can perform debugging without erros. To clarify, this method is in my row object as described bellow: This is the error <?php class Model_DbTable_FeedEntries extends Zf_Db_Table { public function fetchNewEntries($feed_id) { $Feeds = new Model_DbTable_Feeds(); $Feed = $Feeds->getById($feed_id); // ERROR IS HERE! The colum doesn't exists! // And this is only on zend-debugger!!! var_dump($Feed->link) // ... } } I'm completely lost about what's happening, once my application has no errors, the problem is with zend-debugger. The error is: An error occurred Application error Exception information: Message: Specified column "link" is not in the row Stack trace: #0 C:\Program Files\xampp\htdocs\desenvolvimentistas\application\models\DbTable\FeedEntries.php(75): Zend_Db_Table_Row_Abstract->__get('link') #1 C:\Program Files\xampp\htdocs\desenvolvimentistas\application\models\DbTable\FeedEntries.php(50): Model_DbTable_FeedEntries->fetchNewEntries('1') #2 C:\Program Files\xampp\htdocs\desenvolvimentistas\application\models\DbTable\Row\Feed.php(15): Model_DbTable_FeedEntries->getAllByFeedId('1', 1) #3 C:\Program Files\xampp\htdocs\desenvolvimentistas\application\modules\default\controllers\IndexController.php(41): Model_DbTable_Row_Feed->findFeedEntries(1) #4 C:\Program Files\xampp\htdocs\ZendFramework-1.10.0-minimal\library\Zend\Controller\Action.php(513): IndexController->indexAction() #5 C:\Program Files\xampp\htdocs\ZendFramework-1.10.0-minimal\library\Zend\Controller\Dispatcher\Standard.php(289): Zend_Controller_Action->dispatch('indexAction') #6 C:\Program Files\xampp\htdocs\ZendFramework-1.10.0-minimal\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #7 C:\Program Files\xampp\htdocs\ZendFramework-1.10.0-minimal\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front->dispatch() #8 C:\Program Files\xampp\htdocs\ZendFramework-1.10.0-minimal\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() #9 C:\Program Files\xampp\htdocs\desenvolvimentistas\public\index.php(54): Zend_Application->run() #10 C:\Users\RAPOSO\AppData\Local\Temp\dummy.php(1): include('C:\Program File...') #11 {main} I've notice that when I get the row object my colums names are not right. Instead of have "title", "link", ... I have "feeds", "desenvolvimentistas" (projectname), and so on...

    Read the article

  • Unable to Access Zend Server 5 CE after installation

    - by jl
    I have previously installed WAMP on my windows, and now I am trying to install Zend Server 5 CE 5.3.1 Win x86. During the installation of Zend Server, there is a step asking about: web server port : 80 zend server interface port : 10081 I kept to the default. After the installation, I tried to access http://localhost,and is able to see zend test page. But I am unable to access http://localhost:10081/ZendServer, it was stated as page not found. Is it a conflict of my WAMP and the Zend Server? I remembered stopping the apache for WAMP, before trying to access ZS. Could anyone please advise me how to fix it? Thank you.

    Read the article

  • Is Zend Framework a total waste of my time?

    - by Citizen
    Ok, I'm about 50% done with the "30 minute" quickstart guide from Zend. I must be missing something, because this seems like a total waste of time. The point of this quickguide is to create a guestbook, something I could do in 5 minutes with regular naked non-framework php. Here's my path to zend framework: c:/program files/wamp/www/_zend/ Here's my path to my quickstart project: c:/program files/wamp/www/_zend/bin/quickstart/ I have a number of questions at this point: http://framework.zend.com/docs/quickstart/create-a-model-and-database-table 1: I'm running the command line to run my database loading script. I get an error stating the it can't find the Zend/AutoLoader.php becuase my path to the zend library is wrong. I followed all of the steps. I defined the path to my zend library in the main config file, but for some reason, its defined again in my db loader. In all of these scripts that they have me load, it points the relative path to the zend library as being /../library Problem is, there's nothing in that folder. To get to my actual zend folder, you'd need to be (relatively) /../../../../library Which brings me to my 2nd question: 2: Where the #$#$ is the main Zend files supposed to be? The install directions were basically "put it wherever you want", when the real answer (after a bunch of errors and wasted time was) was "put it somewhere so that its really easy to type the full path a thousand times in command line" and "it also better be in a runnable place on your webserver since its going to create your quickstart application in a subdirectory within zend". Which brings us to the third question 3: Am I supposed to have this libary in both the parent core Zend (wamp/_zend/library) AND my application (quickstart/library)? 4: If that is the case, it seems like a ton of wasted files to be uploading. I'd like to use Zend to create products that my customers will download. 5 megs of overhead seems like a bit much. Zend claims you can use these library components separately, but it looks to me like I'm going to have to upload them every time. Which leads to the next question: 5: It appears that perhaps Zend is more for a single application that is not supposed to be distributed. Is this not the case? 6: According to their default file structure everything but my /public folder would be above public_html on my server if I wanted this to rest on my TLD. I would need to rename every reference of /public/ to /public_html/, or am I missing something else?

    Read the article

  • Attempting to set up xampp and zend server on the same machine

    - by umbregachoong
    I am attempting to set up the zend server and xampp on the same machine but I am running into problems. I came across documentation on the zend site that said you cannot do this. However the folks over at apachefriends said you can. I have since discovered that I can run some of the zendframework examples within xampp by downloading the zendframework2 library and the skeleton app from git and I am doing this right now. However, I would like to know how to set them both up without having any conflicts both for the apache2 server and phpmyadmin. (One of the frustrating things is trying to load phpmyadmin in the deployment dialog by using the zpk tool in Zend). What I did in trying to set up both servers on windows 7 is as follows: First I have tried to set up the httpd conf files separately for each server, xampp running on port 8082 , and zend running on port 8088. At the time xampp would work, but zend server would not. This is after setting up the virtual host files separately for each server. Question 1: Where are the zend server error logs? Earlier, I was able to get both of them running configuring the xampp server httpd-conf file alone, however, I experienced problems with phpmyadmin even after configuring phpmyadmin on xampp to work on a different port other than 3306. Second question here: how to set up the two mysql phpmyadmin instances so they do not conflict with each other? Here is the xampp virtual host section: ##ServerAdmin [email protected] DocumentRoot "C:/xampp/htdocs/" ServerName localhost 8082 ##ServerAlias www.dummy-host.example.com ##ErrorLog "logs/dummy-host.example.com-error.log" ##CustomLog "logs/dummy-host.example.com-access.log" common Here is the zend virtual host section: DocumentRoot "C:\Program Files (x86)\Zend\Apache2/htdocs" ServerName localhost:8088 </VirtualHost> I have looked at this httpd.apache.org/docs/2.2/vhosts/ and this http://survivethedeepend.com/zendframeworkbook/en/1.0/creating.a.local.domain.using.apache.virtual.hosts but I am obviously doing something wrong here. I also have the java sdk running on this machine with tomcat and apache and I have no conflicts- too bad this is not the case for zend server and xampp Thanks umbre gachoong

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >