Re: Passing data from modelA to ModelB.

2006-06-24 Thread Carlos Mauricio Samour
what I want too do is that every time I add a record to the Table Transacction increaso o decrease the quantity_onhand value of the table Onhand. On 6/23/06, bigdog [EMAIL PROTECTED] wrote: Would an intermediate table solve your problem to communicate with Transactions and Onhand? I saw

Passing data from modelA to ModelB.

2006-06-22 Thread Carlos Mauricio Samour
I am confused with something I have 2 models one is called Transacctions the other is called Onhand. Transacctions -id -product_id -quantity Onhand -id -product_id -quantity_onhand After each transacction is inserted I want to increase or decrease the quantity_onhand using the quantity value

Re: Bake.php errors when generating models - connecting to mysql

2006-06-18 Thread Carlos Mauricio Samour
I use Linux with php5 and had a similar problem. What I did to correct it is modified the file /etc/php5/cli/php.ini and uncommented : extension=mysql.so Hope that helps you. Good Luck! On 6/17/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks again everyone- Two things-

Re: using cake with database sessions.

2006-06-16 Thread Carlos Mauricio Samour
it is fixed like me. Best Regards, Felix Geisendörfer aka the_undefined -- http://www.thinkingphp.org http://www.fg-webdesign.de Carlos Mauricio Samour schrieb: One more thing. If I set up the define('DEBUG', 0); I get no erros what so ever. On 6/15/06, Carlos

Re: $this-Model-findAll() with a model over 5000 records.

2006-06-15 Thread Carlos Mauricio Samour
Thanks that did the trick! Apreciate your help. I guess I will have to learn how pagination works to display all that data. On 6/15/06, Grant Cox [EMAIL PROTECTED] wrote: To retrieve that many records and instantiate the classes, it is using more than your PHP settings allow for a single

using cake with database sessions.

2006-06-15 Thread Carlos Mauricio Samour
Hello everyone. I have one quiestion regarding using sessions with my database instead of php or cake. I create the cake_sessions database with the sql script that is located on app/config/sql. I change the value in my core.php from define('CAKE_SESSION_SAVE', 'php') to

Re: using cake with database sessions.

2006-06-15 Thread Carlos Mauricio Samour
One more thing. If I set up the define('DEBUG', 0); I get no erros what so ever. On 6/15/06, Carlos Mauricio Samour [EMAIL PROTECTED] wrote: Hello everyone. I have one quiestion regarding using sessions with my database instead of php or cake. I create the cake_sessions database with the sql

$this-Model-findAll() with a model over 5000 records.

2006-06-14 Thread Carlos Mauricio Samour
Hi everyone. I am having this problem trying to retrieve the data from one of my models. In my controller I use: function index(){ $this-set('data', $this-Product-findAll()); } And in my view I get this: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried

Re: Shopping Cart in CakePHP

2006-06-11 Thread Carlos Mauricio Samour
I worked on a similar problem. I have not made a component (yet) But this is what I did. First on the controller I checked if the session data for my invoice header data was stored. I am new at cake. if (!$this-Session-check('documentoventa')) {

Re: prevent expiration of session info?

2006-06-10 Thread Carlos Mauricio Samour
Could you please explain what you did to store the session info in the database? I am trying to set up something just like that. Thanks On 5/29/06, Dave [EMAIL PROTECTED] wrote: What I ended up doing was creating my own database-driven solution. Turns out to be pretty simple. You don't need

Re: Arrays in sessions.

2006-06-10 Thread Carlos Mauricio Samour
Well I just answered my own question by doing this: $this-set('data', $this-Session-read('Transaccion')); Once againg: CAKE RULES! On 6/10/06, Carlos Mauricio Samour [EMAIL PROTECTED] wrote: On the wiki I read that if you wanted to save an array with the session component you do

findall $recursive option

2006-06-09 Thread Carlos Mauricio Samour
I looked at the manual and try to use the $recursive option on one of my methon on a controller. I my index method I want to retreave the data from my model with no recursive data According to what I understood on the manual the way to doint is this way: function index(){

Re: Werid data fetching issue (suddenly changed)

2006-06-01 Thread Carlos Mauricio Samour
I upgraded from vesion 1.0.0.2378 to version 1.1.3.2967 and suddendly a record I fetched with $this-set('data', $this-Bodega-read()) Used to return: Array ( [Bodega] = Array ( [id] = 4 [nombre] = SUCURSAL MERLIOT [activo] = 1 )

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
No this is what I am doing. First I create the autocomplete function inside my controller. -- file app/controllers/productos_controller.php - ?php class ProductosController extends AppController { var $name = 'Productos'; // required for PHP4 installs var $helpers = array('Html',

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
some, provide them here. -- John On Jun 1, 2006, at 10:53 AM, Carlos Mauricio Samour wrote: No this is what I am doing. First I create the autocomplete function inside my controller. -- file app/controllers/productos_controller.php - ?php class ProductosController extends

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
['Producto']['descripcion']}') ); //$this-Producto-findAll(descripcion LIKE ''); $this-layout = ajax; } } Does it have to return anthing If I call the address myself? On 6/1/06, Carlos Mauricio Samour [EMAIL PROTECTED] wrote: My bad the ajax-autocomplete is working

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
I know it susck! :( On 6/1/06, Jf [EMAIL PROTECTED] wrote: I have the same problem, nothing appear, no javascript error the pr($this-data); return too nothing --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour
action=/productos/autocomplete method=POST ?php echo $ajax-autoComplete('Producto/descripcion', '/productos/autocomplete')? ?php echo $html-submit('View Post')?/form Hope it helps someone else. On 6/1/06, Carlos Mauricio Samour [EMAIL PROTECTED] wrote: I even hardcoded de list in my

Dinamic Relationship

2006-05-30 Thread Carlos Mauricio Samour
I am having trouble defining this releationship. What would be the best way to define a relationship when the fk of my database depends in a boolean value. if is true then the fk is equal to table1 but if is false the fk is equal to table2. This is my example clients id i(nt) name

Re: using more than one model in a add_new view

2006-05-02 Thread Carlos Mauricio Samour
Exelent! Thanks for the helpfull tip! I am really impresed by the level of help and support I have received from the Cake comunnity. Another question It might be a litle off topic. If in a view I have. h1First Deposit/h1 TD? echo $html-input('Deposit/inicial');?/TD TD? echo

using more than one model in a add_new view

2006-05-01 Thread Carlos Mauricio Samour
In the examples I read in the wiki using the add action I only see one model being use. What is the best way of using more the one model that uses hasMany reletionships into a view? In my add_new form I want to use 3 models. When I press the Save button it only sends the data of the first model

Re: using more than one model in a add_new view

2006-05-01 Thread Carlos Mauricio Samour
How do I save more than one ModelB at te same time? On 5/1/06, Chris Cassell [EMAIL PROTECTED] wrote: I had to solve this problem myself. Here's what I do--perhaps not the most elegant, but it does work. (This code is off the top of my head and may need some tweaking) In your view set your

Re: using more than one model in a add_new view

2006-05-01 Thread Carlos Mauricio Samour
Thanks You really have been of great help! On 5/1/06, Chris Cassell [EMAIL PROTECTED] wrote: $this-ModelA-ModelB-save (array ('ModelB' = $modelb2)); $this-ModelA-ModelB-save (array ('ModelB' = $modelb3)); ..This code first saves the data of $modelb2 and then replaces it with the data