Re: A link to view page.
echo '', $html->link($results['members'] ['name'],array('controller' => 'members', 'action' => 'view', $results['Member']['id']),array('class' => 'MembersController')), ''; is the code. This is inside a function search() and on top I added var $helpers = array('Html', 'Form', 'Ajax', 'Upload', 'Javascript'); but shows the same error. On Mar 23, 4:07 pm, Sam Sherlock wrote: > Is this code within a helper? > > if so > > $this->Html-link(...); > - S > > On 23 March 2010 10:55, jiru wrote: > > > helper already included. > > var $helpers = array('Html', 'Form', 'Ajax', 'Upload', 'Javascript'); > > > On Mar 23, 3:29 pm, Amit Rawat wrote: > > > include the Html helper in your controller > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.comFor > > more options, visit this group at > >http://groups.google.com/group/cake-php?hl=en > > > To unsubscribe from this group, send email to cake-php+ > > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > > ME" as the subject. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
Re: A link to view page.
helper already included. var $helpers = array('Html', 'Form', 'Ajax', 'Upload', 'Javascript'); On Mar 23, 3:29 pm, Amit Rawat wrote: > include the Html helper in your controller Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
Re: A link to view page.
I tried this but shows the Undefined variable html : echo '', $html->link($results['members'] ['name'],array('controller' => 'members', 'action' => 'view', $results['Member']['id']),array('class' => 'MembersController')), ''; On Mar 23, 1:32 pm, Amit Rawat wrote: > Try this:- > > > link($results['members']['name'],'/members/view',null);?> > > > Enjoy: > Amit:) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
Re: A link to view page.
hii, It was a long time to cu. ok here it shows the old error :Notice 8: Undefined variable html On Mar 23, 1:32 pm, Amit Rawat wrote: > Try this:- > > > link($results['members']['name'],'/members/view',null);?> > > > Enjoy: > Amit:) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
A link to view page.
Hii, Can anybody add a link on this code ? And when click on the link it should redirect to the view of the search result.( ie.to array('controller' => 'members', 'action' => 'view')) code : echo ''.$results['members']['name'].''; I'm faild to add the link on it. Plz help me. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
Create a link
In this code echo ''.$results['members']['name'].''; this will shows the result from the database. Here I need a link to the view of the result when I click the result. I will try this but shows error : echo '', $html->link($results['members'] ['name'],array('controller' => 'members', 'action' => 'view', $results['Member']['id']),array('class' => 'MembersController')), ''; Error is undefined variable htmllink() etc and some warning messages. How can I solve this ? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
how to get the upcoming birthday using query
Haii, Plz help me! The following query retrieve the name and age from a member table whose birthdays falling between current date and current date +7.Actullay this query is working correctly.But i do'nt know how to use this query directly with in the controller.Does anyone know how to use the following query in controller and how to get those results in the view page. select name,(YEAR(CURDATE())-YEAR(date_of_birth)) - (RIGHT(CURDATE(),5)Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
How to change a field non-editable
Hii, In my edit file , i don't want to edit two fields. How to make a field as non editable.? Need to display only the value. Plz help me. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
query resultant display on index
Hii , programmers, This is my controller function. function index() { $result=$this->IssueLibraryItem->query("select id,title from library_items where library_items.id in (select issue_library_items.library_item_id from issue_library_items where return_date is null);"); $options = array(); foreach($result as $value) { $index = $value['library_items']['id']; $options[$index] = $value['library_items']['title']; } $this->set('options',$options); $this->IssueLibraryItem->recursive = 0; $this->set('issueLibraryItems', $this->paginate()); } And my index.ctp > link($issueLibraryItem['LibraryItem'] ['title'],array('controller' => 'library_items', 'action' => 'view', $issueLibraryItem['LibraryItem']['id']));?> link($issueLibraryItem['Member']['name'],array ('controller' => 'members', 'action' => 'view', $issueLibraryItem ['Member']['id'])); ?> But my index shows the whole issueed items in the list. But i like to display only the items that should come according to the query result. How can I solve this problem. Please help me Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
dropdown list validation
I have a dropdown list in my form. How can i give it a validation criteria such that, if i try to enter data from it to database it should check for uniqueness. If already an entry is there in the database for it, it should display a message. We can do it for a text area using validation in the model.How it can be done for dropdown list? -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
sql query in model
Hai, Programmers, This is my mysql query , select id,title from library_items where library_items.id not in (select issue_library_items.library_item_id from issue_library_items where return_date is null); Can anybody give me the corresponding code in the model file?(similer cakephp query) (issue_library_item.php) regards, jiru -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
Re: saving date to mysql problem
Thank you.. On Nov 12, 3:13 pm, Aurimas wrote: > Change date format 11/12/2009 to 2009-12-11 in your datepicker or > change format before saving. > MySQL displays DATE values in ‘-MM-DD’ format > > On Nov 12, 12:08 pm, jiru wrote: > > > hii, > > > echo $form->input('issue_date',array('type'=> 'text','id'=> > > 'datepick')); > > this is my issue date input field in add.ctp. > > I'm displaying the default(current)date using jquery. It showing like > > 11/12/2009 in text field. In my MySql db the field is -- 'issue_date > > DATE'. After saving the data in database it shows the entry as > > -00-00. What is the problem ? Please give me a solution. Where to > > I change ? -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
saving date to mysql problem
hii, echo $form->input('issue_date',array('type'=> 'text','id'=> 'datepick')); this is my issue date input field in add.ctp. I'm displaying the default(current)date using jquery. It showing like 11/12/2009 in text field. In my MySql db the field is -- 'issue_date DATE'. After saving the data in database it shows the entry as -00-00. What is the problem ? Please give me a solution. Where to I change ? -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
null value from date field.
Hai, Please give me the code for to check date field is null or not. ? regards, jiru -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
Re: Date Calculation Problem
hii, I put the code like this : echo $form->input('due_date',array(date('Y- m-d H i s', strtotime('+1 hour',strtotime($start_datetime); shows an error, Notice (8): Undefined variable: start_datetime [APP/views/issue_library_items/add.ctp, On Oct 30, 12:59 pm, Martin Westin wrote: > I do a lot of this kind of thing: > > date('Y-m-d H i s', strtotime('+1 hour',strtotime($start_datetime))); > > You can use handy things like +2 monday to get to monday two weeks > from now and a number of cool things that I prioritize. > > /Martin > > On Oct 30, 8:08 am, Jiru wrote: > > > hii, > > > In my project there is issuedateand duedatein dropdown list. > > My problem is, > > if the issuedateis October 10 2009 i want to display the duedate > > as October 20 2009 automatically. How i can add/calculate thedate. > > > regards, > > jiru -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
add date from one field
Hii, In my program code, echo $form->input('duedate',array ('dateFormat'=>'YMD','selected'=>strtotime('2000-01-01'),'minYear'=> date('Y') - 10,'maxYear' => date('Y'))); , it shows 2000-January-1 in dropdown list. My problem is how i can display, after 15days in dropdown list from the current system date.(PC date). My issue-date field shows current system date. echo $form->input('issue_date'); Allways the due date should display the date +15 days from the issue date. Vey urgent. please help me. regards, jiru -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
Re: time duration
Hello, here is the code file: add.ctp div class="trainingCourses form"> create('TrainingCourse');?> input('course_code'); echo $form->input('name'); echo $form->input('training_type_id'); echo $form->input('Duration',array('training_courses.time', 'type' => 'time', 'interval' => 15 , 'empty' => ' ','options' => array ('hh','mm'))); echo $form->input('course_sequence'); echo $form->input('comments'); ?> end('Submit');?> On Oct 30, 1:23 pm, John Andersen wrote: > Please show the code with what you are trying to accomplish, so that > we may better be able to help you! > Enjoy, > John > > On Oct 30, 9:19 am, Jiru wrote: > > > Even though tried to change the options the hh/mm option is not > > available. > > > On Oct 30, 11:09 am, John Andersen wrote: > > > > Please read the cook book! > > > >http://book.cakephp.org/view/189/Automagic-Form-Elements#options-time... > > > > Enjoy, > > > John > > > > On Oct 30, 8:00 am, Jiru wrote: > > > > > Hi, > > > > I have atimefield in the form. In the combo box it have > > > > meridians[am/pm]. > > > > As I wantdurationI need hh/mm instead of am/pm in the drop > > > > down.Please give suggessions for this. > > > > Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: time duration
Even though tried to change the options the hh/mm option is not available. On Oct 30, 11:09 am, John Andersen wrote: > Please read the cook book! > > http://book.cakephp.org/view/189/Automagic-Form-Elements#options-time... > > Enjoy, > John > > On Oct 30, 8:00 am, Jiru wrote: > > > Hi, > > I have atimefield in the form. In the combo box it have > > meridians[am/pm]. > > As I wantdurationI need hh/mm instead of am/pm in the drop > > down.Please give suggessions for this. > > Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Date Calculation Problem
hii, In my project there is issue date and due date in dropdown list. My problem is, if the issue date is October 10 2009 i want to display the due date as October 20 2009 automatically. How i can add/calculate the date. regards, jiru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
time duration
Hi, I have a time field in the form. In the combo box it have meridians[am/pm]. As I want duration I need hh/mm instead of am/pm in the drop down.Please give suggessions for this. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Problem with view obtained from baking
Hii, When we tried to edit the baked views like add.ctp, view.ctp etc the changes made in the forms are not reflecting. How to track this problem ? Plz Help. regards, jiru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Problem with DATE.
Hii Programmers , In cakephp when I use DATE field it displays the dropdown list with year limit 1989-2029 how can we get the date from 1950? regards, jiru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
what is the tentative availability date roadmap of CakePHP 1.3 ?
Hai, Developers , What is the tentative availability date roadmap of CakePHP 1.3 ? regards, jiru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
need text box for ajax input and output.
//select.ctp $v) { echo "$v"; } } ?> here it shows the values in dropdown list when i used to select it using Ajax. But for the same process i need it in text boxes, both the input and output. How i can do it ? regards, jiru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How to name the fields when 2 fields in a table refers to same field in another table
Hi CakePHP programmers, plz help me.. We have two tables - users and services. services table needs to have two fields (served_by & served_to) - both referring to user_id. That case, what should be field names in services table because as per cakephp file naming conventions "foreign keys should always be: table_name_in_singular_form_id" and in our case it should be user_id. But we can't have two fields with same field name. Any thoughts on how we should name the two fields for services table ? regards, jiru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
autocomplete program code error.
dear cakePHP dvelopers , Plz help me in my autocomplete program. here i adding my program code...hv a look on it, controller function - layout = 'ajax'; //$this->set('items',$this->Autocomplete->find('all',array ('recursive =>3'))); $this->Autocomplete->recursive = 0; $this->set('autocompletes', $this->paginate()); //echo "hello"; } function getData(){ $this->layout = 'ajax'; $this->set('items',$this->Autocomplete->find('all',array())); } } ?> getData.ctp --- anybody can correct the code in getData funcion or anywhrer.? or getData.ctp file. help me for ajax function page and css , js file . regards, jiru. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
input text box instead of dropdown list
hii , In my project the names are displayed in dropdown list. bt i need it in input text box with ajax autocomplete code. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
autocomplete program
Hii CakePHP programmers, Any body can give me the complete source code for Autocompletion in text boxes. i expect the code with whole .ctp in the view and php file in the model , controller php file ajax file and css. Help me. The value should read from the database. regards, jiru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
i can't get data from table in Autocompletion
In my autocomplete_controller() i use the function function getData(){ $this->layout = 'ajax'; $this->set("typed",$this->data['Autocomplete']['AutocompleteName']); for($i=0;$i<10;$i++){ $items[] = rand(1,100); } $this->set("items",$items); } it will show the random numbers 1 to 100 in autocompletion text field when i type any letter. Anybody can give me the code to access the data from a table. I expect the query. Help me plz.! I add the related files here! // get_data.ctp //index.ctp charset("UTF-8"); $javascript->link("prototype",false); $javascript->link("scriptaculous",false); $html->css("cake.ajax"); ?> create('Autocomplete');?> autocomplete('AutocompleteName',"getData",array()); ?> end('Submit');?> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---