Re: how to pass parameter to $ajax->link ??
I did something like this with an autocompleter, it should not be very different with an Ajax link. Use a fixed Id for your link (called MyLinkId in the example) and for your input (MyTextId), and in the "onchange" property for your input, try this : lnk = document.getElementById('MyLinkId'); txt = document.getElementById('MyTextId'); lnk.url = '/umanager/addTag/' + txt.value; I didn't tried this code but something like this should work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
MySQL to MySQLi driver
Hello bakers, I'd like to use the mysqli driver instead of the mysql driver. I change 'driver' and 'connect' in database.php, and now my application doesn't work anymore. I have no database error message, but no data from my requests. What are the differences between those drivers for CakePHP ? Did I missed something to do ? Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Ajax submission of form affecting navigation of browser
I think you could use a hidden DIV (with "display:none") to put the result of the Ajax request : echo $ajax->form('/pages/updateMenusInSession', 'post', array("id" => "menuForm", "update"=>"myHiddenDiv")); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Problem with setting up cake on server
If you have to write "index.php" in the URL, then the mod_rewrite isn't enabled. Did you uncomment this line in core.php ? define ('BASE_URL', env('SCRIPT_NAME')); Do you use the HTML helper to create correct links to your images and css ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: How to manage large amount of data ?
It works fine when I change the php.ini settings, unfortunately, the software I'm working on will be executed on a mutualised server, and I don't know if this file will be accessible. I tried to use "unset" to free memory but it didn't worked. Thanks for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: How to manage large amount of data ?
I have to generate an Excel workbook (in XML format) with a lot of data from my database, so I can't use pagination or something like that, I have to get all the data. Each worksheet display data from one DB request, and everything works fine when I display only one worksheet. Until know, I stored each request result in a huge array and I got memory error. What I'd like to do is : - output the header of the XML document - get result from the first request - output the first worksheet - free memory for the result - get result from the second request - output the second worksheet - free memory - ... - output the XML footer This is what I meant when I said "rendering the view in many times" (my english may be bad, sorry). I'd like to render the view many times, each time with a different worksheet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: How to manage large amount of data ?
After looking at dbo_source.php, the error is from PHP which cannot allow a too big array. Is it possible to render the view in many times so I would be able to free memory between each request ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: How to keep same session when redirect to sub-domain ?
I might be wrong, but if the session id is stored in a cookie, it can't be used on another subdomain. I suppose that using session id in a GET request should work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
How to manage large amount of data ?
Hi all, I have a (quite big) request in my Cake application. When I call it one time, it works fine, but I have to call it many times in a loop to fill many arrays, and I get this error : Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1024 bytes) in /appli/projects/fluidit/apache_2.0.59/htdocs/fluidit/cake/libs/model/datasources/dbo_source.php on line 308 I don't know if this is a MySQL or a PHP error. The 8388608 bytes correspond to some buffer variables in the MySQL configuration so it seems to come from here, but I might be wrong. I can't change the MySQL or PHP config, so I'd like to "split" the requests in many parts to avoid this problem. If the error come from MySQL, I could execute each request in a different connexion, and if it come from PHP, maybe render a first part of the data, then execute the next request, then render again... How could I do this with Cake ? TIA --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Helpers and Components
You forgot to call "view" in the helper : class MyHelper... function dumb(param1, param2){ return $this->view->controller->MyComponent->dumb(param1, param2); } ... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: autocomplete options ?
The $ajax->autoComplete method create the element itself, so you don't need it in your page and in the 'update' field. An error can also come from your '/tournees/refresh_vehicules' controller method or view. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: ajax observeField on a select
Did you try an Ajax Autocompleter ? It works fine to replace a select tag with a very long list. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Problem with associations
Thanks for your answers. I use CakePHP 1.1.7.3363 (I should upgrade to the last version). The main problem in this case with the hasMany association is that it does a lot of requests, which are useless, everything I need can be done with only one. A profile can have many users. Here is a "UML-like" schema of my tables : |Profile|-[0,*][1,1]-|User|-[0,*][1,1]-|Post| And the (shortened) request I'd like to have : SELECT Post.*, User.*, Profile.* FROM Post LEFT JOIN User ON Post.userid = User.id LEFT JOIN Profile ON User.profileid = Profile.id SORT BY Profile.something --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Problem with associations
Hello everyone. I want to display a table in a CakePHP with informations from 3 tables, let's call them posts, users, profiles, and the 3 associated models Post, User, Profile. "Post" has a foreign key to "User", and "User" has a foreign key to "Profile", so I could get all the informations I want with two LEFT JOIN on those keys, but I can't do it with a findAll call on "Post". When I put "recursive" > 1, I can get what I want, but CakePHP make one subquery for each line, instead of using another LEFT JOIN, so I can't sort the table with something from the "Profile" model. I use "belongsTo" association with my models. Am I wrong or did I missed something ? I know I can write the query myself, but is there a way to let CakePHP do it itself ? Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Where should I put statistics ?
Hi everyone, I have an application to write with CakePHP, and I need to display some statistics (men/women, people in each department, ...). In the MVC model, which is the best way for doing this ? I hesitate between doing this in the model, with new methods to access those values, or in the controller. Thanks a lot in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---