Re: Loop with field() and save() not working as expected

2007-08-11 Thread phalvrson
Francky - you rock!!! The cacheQueries=false did the trick! (I also agree on the comments on how I was using exists() ) For what it is worth, here is what that section of code looks like now - and works just the way I expect it to: ;-) /* Process the households db part. */ $this_userid = $csv

Security on high/medium

2007-08-11 Thread phpjoy
Where can I find the differences between medium/high security in 1.2? Auth started acting crazy with external links until I set the security to medium instead of high.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: problem with validator cakephp 1.2

2007-08-11 Thread stefano
i have this var $validate = array( 'username' => '/[a-z0-9\_\-]{3,}$/i', 'passwd' => VALID_NOT_EMPTY, 'name' => VALID_NOT_EMPTY, 'lastname' => VALID_NOT_EMPTY, 'city' => VALID_NUMBER, 'email' => VA

Re: CakePHP + Xdebug + Vim

2007-08-11 Thread [EMAIL PROTECTED]
in cake/basics.php line 42 there is a eval() function that makes vim +xdebug exit if ur using PHP4. it seems xdebug doesn't like the eval() thing. Hope this helps those using vim + xdebug to trace through cakephp Francis aka nukem On Jul 24, 3:45 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote

Re: Loop with field() and save() not working as expected

2007-08-11 Thread francky06l
As far as I know if you do not work with "transactional mode", you do not have anything to do for "updating" the database. If the insert gives you warning it's because you are trying to use an existing id. Set this->data['Household']['id'] = ""; before saving ..and set $this- >Household->cacheQuer

Re: Loop with field() and save() not working as expected

2007-08-11 Thread phalvrson
Yup - I think you are right about using $this->id... Adding the Model::create() before the add prevents the update and forces an insert (which gives warning messages about trying to insert a duplicate record...) I still need to figure out how to tell Model that I want saves committed as they occ

Re: Loop with field() and save() not working as expected

2007-08-11 Thread francky06l
Maybe a call to $this->Household->create() , before saving the new record. Actually if you look to the field methode (in the model.php core libs). it uses $this->id for reading. I think if you do not call the create() function of the model, you are always inserting over the same on. On Aug 12, 12

Re: problem with validator cakephp 1.2

2007-08-11 Thread francky06l
What validations do you have in your model ? You should not need to call $this->validateErrors($this->User).. By the way, are you data saved in the table? On Aug 12, 12:00 am, stefano <[EMAIL PROTECTED]> wrote: > ups i know this die() was for debug :P the is without this die() and > pr(); > bu

Re: Loop with field() and save() not working as expected

2007-08-11 Thread phalvrson
Hey Francky, thanks for the reply. I tried using your code, but had the same results. ( I think it is essentially the same since if I am reading the code right, the $condition can be either a string or an array...) In further testing, if I am trying to find a match in something that already exi

Re: problem with validator cakephp 1.2

2007-08-11 Thread stefano
ups i know this die() was for debug :P the is without this die() and pr(); but i still have this problem :( On 11 ago, 14:18, francky06l <[EMAIL PROTECTED]> wrote: > well your model can't save the data if you use the code posted. > Thedie(); prevents the save to be executed. > remove the cal

Re: define('DEBUG', 0) problem

2007-08-11 Thread Samuel DeVore
also you might make sure that you clean all the caches that are in app/tmp (like the model cache) make sure you have the right structure there as well app /tmp /cache /models /persistent /views /logs /sessions /tests should be writable by the user t

How I created a global record search

2007-08-11 Thread savagekabbage
I wanted to incorporate a simple Global Record Search into my cart (Selling Made Simple), and this is how I did it if anyone's wondering. This example will basically allow you to search any model by any any field depending on what you put in the database. This code is from Selling Made Simple and

Re: Loop with field() and save() not working as expected

2007-08-11 Thread francky06l
try to add : $match_userid = "Household.userid = '" . $this_userid . "'"; $this->Household->set( array('id' => $this_userid)); $household_id = $this->HouseHold- >field("Household.id"); hope this helps On Aug 11,

Re: problem with validator cakephp 1.2

2007-08-11 Thread francky06l
well your model can't save the data if you use the code posted. Thedie(); prevents the save to be executed. remove the call to die(); On Aug 11, 7:33 pm, stefano <[EMAIL PROTECTED]> wrote: > hello i have a litle problem with validation data in cakephp1.2 > > i know that is a noob problem but

Loop with field() and save() not working as expected

2007-08-11 Thread phalvrson
I thought I would start a new post since I think I understand the problem better... I am looping through a CSV file using fgetcsv and populating a set of tables from it. To illustrate, here is a trimmed version of my code to just show processing for one of the tables, households: functio

Re: define('DEBUG', 0) problem

2007-08-11 Thread francky06l
Did you create the app/tmp directory structure and verify is readable/ writable .. hope this helps On Aug 11, 5:29 pm, Ruud Gâst <[EMAIL PROTECTED]> wrote: > Greetings! > > I was developing a site using the development debug mode (1). Then I > was finished, hooray! and I put it live and set the d

problem with validator cakephp 1.2

2007-08-11 Thread stefano
hello i have a litle problem with validation data in cakephp1.2 i know that is a noob problem but i can't fix it i have this controller var $uses = array('User'); function index() { $ciudades = array(1=>"Concepción",2=>"Hualpen"); $this->set("ciudades",$ciudades);

Re: How to build form with multiple records?

2007-08-11 Thread bforchhammer
Hey guys, I just had a look at the core files and patched something up this afternoon... Now I can build multi-record forms as Travis suggested by using some kind of loop and $form->input("Model.".$id.".field"); works pretty well, only validation and saving of course still needs to be handled by m

define('DEBUG', 0) problem

2007-08-11 Thread Ruud Gâst
Greetings! I was developing a site using the development debug mode (1). Then I was finished, hooray! and I put it live and set the debug value to production mode (0). The strange thing is that my site now is immensly slow and if it loads at all, the styles don't... If i set the debug mode back t

HABTM Does not select extra table :(

2007-08-11 Thread Mech7
I am trying to make a function to retrieve articles based on there category: Article controller 15, 'page' => 1, 'order'=>array('id' => 'desc'), 'fields' => array('id', 'title', 'published', 'frontpage', 'created', 'modified', 'slug')); // Helpers var $h

$this->Model->AssociatedModel

2007-08-11 Thread CakeSpork
Now that I'm finishing my first 'real' cake app which will actually have to be used and such, I'm regretting the decisions I made in the beginning more and more. I'm glad everything works, but every time I find out something new I could have used in the base design it stings. In an effort to prev

Re: CAKE_SESSION_STRING - what it's behavior?

2007-08-11 Thread Geoff Ford
phpjoy, Thanks for the praise :) Geoff On 8/11/07, phpjoy <[EMAIL PROTECTED]> wrote: > > > Just making sure.. :-) > Thank you. > > By the way, I really enjoy your blog. It's a great piece of work. > > On Aug 10, 2:05 pm, "Geoff Ford" <[EMAIL PROTECTED]> wrote: > > Nope size is not an issue here

Re: Loop with select and insert not working as expected

2007-08-11 Thread phalvrson
Thanks for the information... unfortunately I am still struggling to understand this. What it boils down to is that the following code never returns an $order_id, even if there is a record in orders that has a student_id = 1 code: $match_student_order

Re: Auth1.2 component not showing methods.

2007-08-11 Thread francky06l
Does this mean my ticket for the recursive (in User->find call) will not be added later ? :-( Cheers :-) Franck On Aug 10, 6:37 pm, Gwoo <[EMAIL PROTECTED]> wrote: > the Auth component is not moving anymore --~--~-~--~~~---~--~~ You received this message because

Re: $javascript->endBlock() question

2007-08-11 Thread francky06l
I am just asking if it's mandatory to call $javascript->cacheEvents before something like this : ..some html code here $javascript->codeBlock(); alert('test'); $javascript->endBlock(); if cacheEvents it's not called, the view is "empty". By the way having $script_for_layout in the layout, doe

Re: $javascript->endBlock() question

2007-08-11 Thread rtconner
I dunno what you are asking, but the codeBlock is there so you can use $javascript_for_layout in your layout so you can put all js code into the html Head tag section --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "