session question

2007-05-31 Thread christianandradet

hi,
I have an aplication that depends on a session variable defined in
another application, both applications were developed with cakephp.
Is there any way to read a session variable that was defined in
another application??


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



session variable problem

2007-05-24 Thread christianandradet

hi,
I got this problem: i am trying to join 2 applications, but the 2 of
them work with different versions of cakephp (1.1...,1.2...), i have
defined a session variable with the same name in the 2 aplications,
when i try to access this variable from 1.1... to 1.2... it works
fine, but when i try to access from 1.2.. to 1.1.. the session
variable is re-defined and gets it`s initial value. What could it be
the problem??
Here it's a little part of code:

 if (!$this->Session->valid()) {
$this->Session->renew();
}
if (!$this->Session->check('USER_LOGIN_KEY')) {
$this->Session->write('USER_LOGIN_KEY','anonymous');
}

Please help Thanks


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



acl help aro->create

2007-05-14 Thread christianandradet

hi
i am working with cakephp 1.2..., i'am traying to use this in
application,
$aro = new Aro();
$aro->create(1, null, 'admin');

but when I execute it the user is not created and no error message is
displayed, but when i use the same function with cakephp 1.1 it works

What should i do, does the way to use this changed to this version??
Please 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?hl=en
-~--~~~~--~~--~--~---



acl problem

2007-05-07 Thread christianandradet

Hi,
I am trying to work with acl, i have configured my appcontroller, but
when i test the login page in firefox the following error message it`s
displayed:

ingles:The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for
this address in a way that will never complete.
*   This problem can sometimes be caused by disabling or refusing
to accept cookies.

why is this happending???
how can i solve it?
i have build my code according to the example shown in this page:
http://bakery.cakephp.org/articles/view/user-permissions-and-cakephp-acl
thanks


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: view blob image

2007-04-30 Thread christianandradet

Gracias Mariano mejor pregunto en el foro de espaƱol que es mas
chevere

On 30 abr, 10:51, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> He translated it.
>
> Resides you ought to be learning spanish by now if you want to keep talking
> to me :)
>
> Need more hands on the Spanish google group, AD7six is just not enough.
>
> -MI
>
> ---
>
> Remember, smart coders answer ten questions for every question they ask.
> So be smart, be cool, and share your knowledge.
>
> BAKE ON!
>
> blog:http://www.MarianoIglesias.com.ar
>
> -Mensaje original-
> De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> de Dr. Tarique Sani
> Enviado el: Lunes, 30 de Abril de 2007 12:49 p.m.
> Para: cake-php@googlegroups.com
> Asunto: Re: view blob image
>
> U someone who understands the language will hopefully reply


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: view blob image

2007-04-30 Thread christianandradet

hi,
thanks for your help,
i tried with firefox, and i get this error message:
La imagen "http:///cake/appja/funcionarios/view/45"; no puede
mostrarse, porque contiene errores.
the image "http:///cake/appja/funcionarios/view/45"; can't be
shown, because it has errors.

I don't know what to do please help. i already installed
httpliveheaders.

On 30 abr, 10:17, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On 4/30/07, christianandradet <[EMAIL PROTECTED]> wrote:
>
>
>
> > in the layout, in the view.ctp file,
>
> Use a tool like httpliveheaders under firefox to see what are the
> exact headers that your browser is recieveing
>
> HTH
>
> T
>
> --
> =
> PHP for E-Biz:http://sanisoft.com
> Cheesecake-Photoblog needs you!:http://cheesecake-photoblog.org
> =


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: view blob image

2007-04-30 Thread christianandradet

in the layout, in the view.ctp file,


On 30 abr, 10:01, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Apr 30, 2007, at 8:36 AM, christianandradet wrote:
>
>
>
> > hi,
> > I am trying to view an image that is store in the database with a blob
> > data type, this is the code i am trying
> > 
> > 
>
> > When i display this, the binary data is displayed
>
> Where is this code? In the controller or the layout?
>
> -- John


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



view blob image

2007-04-30 Thread christianandradet

hi,
I am trying to view an image that is store in the database with a blob
data type, this is the code i am trying



When i display this, the binary data is displayed

What should I do??


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



edit multiple list

2007-04-20 Thread christianandradet

hi,
this is what i am doing,
in the add function
$funareas = $this->Funcionario->Funtoare->Funarea->generateList();
in the add view
input('funare_id', array('options' =>
$funareas,'multiple'=>'true'));?>
then in the add function of the controller after saved
$fun_id = $this->Funcionario->getLastInsertId();
foreach($this->data['Funcionario']['funare_id'] as $funare):
  $funareas = $this->Funcionario->Funtoare->execute('insert into
funtoares(funarea_id,funcionario_id) values('.$funare.','.
$fun_id.')');
endforeach;

the model is this:
i have a employee that has several sectors, and this relation n to n
is broken with the table
funtoares.
Inserting is not my problem, i have no idea how to search for the
sectors selected and then display them, the selected and the no
selected, in the list of the edit view. i do not know what to do
please help me, should I change the idea an do it with check boxes.
Hope you understand my question
Christian Andrade
Thanks


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



composed primary key

2007-04-18 Thread christianandradet

hi
i need a model to hava a composed primary key i tried with:
var $primaryKey = 'id,Autoridade.cliente_id';
and
var $primaryKey = array('id',cliente_id');

with the first one the next error message is displayed when I try to
edit:
Query: SELECT `Autoridade`.`id`, `Autoridade`.`cliente_id` FROM
`autoridades` AS `Autoridade` LEFT JOIN `autcargos` AS `Autcargo` ON
`Autoridade`.`autcargo_id` = `Autcargo`.`id` LEFT JOIN `juridicos` AS
`Juridico` ON `Autoridade`.`cliente_id` = `Juridico`.`cliente_id`
WHERE `Autoridade`.`id,Autoridade`.`cliente_id` = 2 LIMIT 1
1054: Unknown column 'Autoridade.id,Autoridade.cliente_id' in 'where
clause'

but whe i try with the second one this error is displayed when trying
to see the index:
Query: SELECT COUNT(*) AS count FROM `autoridades` AS `Autoridade`
LEFT JOIN `autcargos` AS `Autcargo` ON `Autoridade`.`autcargo_id` =
`Autcargo`.`id` LEFT JOIN `juridicos` AS `Juridico` ON
`Autoridade`.`cliente_id` = `Juridico`.`cliente_id` WHERE
`autoridade`.`cliente_id` = 8 ORDER BY `Autoridade`.`Array` ASC
1054: Unknown column 'Autoridade.Array' in 'order clause'

I don't know what to do, how do i define the composed primary key???


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



save dates

2007-04-10 Thread christianandradet

hi, i am trying to save a date with $form->input('date'), with the
select list of the y/m/d, but when save it executes successfully but
the fiel 'date' does not appear in the insert statement, i checked for
sintax and it's ok , HElp please


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



update with save

2007-04-02 Thread christianandradet

hi, how do i tell cakephp that i want to make an update not an insert,
could you explain me the difference please. I do not know how this
works.
Thanks


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



bake problem

2007-04-01 Thread christianandradet

hi i'am trying to generate my application with "cakephp bake", i can
generate models and controllers but when i try to generate a view this
error message apears, and i do not know to fix it.

Fatal error: Class 'Controller' not found in C:\www\cake\cake
\app_controller.php  on line 40

How do i fix it??? please help!! Thanks


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Cakephp Databases

2007-03-30 Thread christianandradet

Sorry, i have read better and cakephp can do what i want

On 30 mar, 09:23, "christianandradet" <[EMAIL PROTECTED]>
wrote:
> Hi, I know that cakephp works with this 3
> databases(mysql,posgresql,sqlite), but is there a way that i can use
> this incredible framework with databses like sql server or oracle??


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Edit problem

2007-03-30 Thread christianandradet

Iam trying to edit a Cliente an i have this in my model 'Cliente':
 var $name = 'Cliente';

 var $hasOne = array('Naturale' => array('className'=>
'Naturale',
  'conditions'   => '',
  'order'=> '',
  'dependent'=>
true,
  'foreignKey'   =>
'CLI_ID'
)
  );


when i try to save(update) an insert statement is created and an error
of duplicate entry is shown.
But i need to edit i do not know why this is happening, i tested it
with a simplier model and it works fine, please help!!


function edit($id = null)
{
  if (empty($this->data['Cliente']))
  {
  $this->Cliente->id = $id;
  $this->data = $this->Cliente->read();
  }
  else
  {
  $this->data['Naturale']['CLI_ID'] = $this->data['Cliente']
['ID'];
  if($this->Cliente->Naturale->save($this->data['Naturale']))
  if($this->Cliente->save($this->data['Cliente']))
  {
$this->flash('El cliente fue modificado.','/
Clientes/');
  }
  }}


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Cakephp Databases

2007-03-30 Thread christianandradet

Hi, I know that cakephp works with this 3
databases(mysql,posgresql,sqlite), but is there a way that i can use
this incredible framework with databses like sql server or oracle??


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Data validation problem

2007-03-30 Thread christianandradet

this is the code:
/***MODEL***/
class Note extends AppModel
{
 var $name = 'Note';

   var $validate = array(
  'title' => VALID_NOT_EMPTY,
  'body' => VALID_NOT_EMPTY,
   );

}
/VIEW***/
Add Note
" method="post">

   
   Title:
   input('Note/title', array('size' => '40'))?>
   tagErrorMsg('Note/title', 'Title is required.')?
>
   
   
   Body:
   textarea('Note/body') ?>
   tagErrorMsg('Note/body', 'Title is required.')?>
   
   
   submit('Save') ?>
   


/**Controller*/
class NotesController extends AppController
{
var $name = 'Notes';
var $uses = array('Note');
var $helpers = array('Html','Ajax','Form');

function index()
  {
//$this->set('notes', $this->Note->findAll());
  }

function view($id)
  {
  $this->Note->id = $id;
  $this->set('data', $this->Note->read());
  }

 function add ()
   {
  if (empty($this->data))
  {
 $this->render();
  }
  else
  {
 if($this->Note->save($this->data))
 {
 $this->flash('Your note has been updated.','/notes/');
 }
 else
 {
//Danger, Will Robinson. Validation errors.
    $this->set('errorMessage', 'Please correct errors
below.');
$this->render();
 }
  }
   }

On 29 mar, 13:29, "savagekabbage" <[EMAIL PROTECTED]> wrote:
> Do you have your model set up correctly to handle data validation?
>
> On Mar 29, 12:49 pm, "christianandradet" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > hi i am trying to do the validation that this page 
> > teaches:http://manual.cakephp.org/chapter/validation
> > it works but the messages do not appear:
> > tagErrorMsg('Post/title', 'Title is required.')?>
> > I do not know whatis the problem, maybe it's something that needs to
> > be configured,
> > Please help
> > Thanks!- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Data validation problem

2007-03-29 Thread christianandradet

hi i am trying to do the validation that this page teaches:
http://manual.cakephp.org/chapter/validation
it works but the messages do not appear:
tagErrorMsg('Post/title', 'Title is required.')?>
I do not know whatis the problem, maybe it's something that needs to
be configured,
Please help
Thanks!


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Error al editar un registro

2007-03-29 Thread christianandradet

Iam trying to edit a Cliente an i have this in my model 'Cliente':
 var $name = 'Cliente';

 var $hasOne = array('Naturale' => array('className'=> 'Naturale',
  'conditions'   => '',
  'order'=> '',
  'dependent'=>  true,
  'foreignKey'   => 'CLI_ID'
)
  );

when i try to save an insert statement is create and an error of
duplicate entry is shown.
But i need to edit i do not know why this is happening, i tested it
with a simplier model and it works fine, please help!!

function edit($id = null)
{
  if (empty($this->data['Cliente']))
  {
  $this->Cliente->id = $id;
  $this->data = $this->Cliente->read();
  }
  else
  {
  $this->data['Naturale']['CLI_ID'] = $this->data['Cliente']
['ID'];
  if($this->Cliente->Naturale->save($this->data['Naturale']))
  if($this->Cliente->save($this->data['Cliente']))
  {
$this->flash('El cliente fue modificado.','/Clientes/');
  }
  }
}


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: one to one relationship (ADD)

2007-03-28 Thread christianandradet

but if i do it the way you say maybe when two users want to insert a
person at the same time,  is it the posibility that the judge gets the
code of another person??, or maybe the tables are locked when
inserting i dont know??? or maybe is there another way to do it??
Please help me thanks

> in your afterSave() of the Person model you can do something along
> these lines:
>
> if (isset($this->Judge) && !empty($this->data['Judge']))
> {
>$this->data['Judge']['person_id'] = $this->id;
>$this->Judge->save($this->data);
>
> }
>
> Dimitry Z.
>
> On Mar 26, 12:05 pm, "christianandradet" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > hi,
> > i am traing to insert data with a one to one relationship, i am
> > working with this tables:
> >  CREATE TABLE 'people` (
> >   `id` smallint(5) unsigned NOT NULL auto_increment,
> >   `lastname` varchar(40) NOT NULL,
> >   `firstname` varchar(40) NOT NULL,
> >   PRIMARY KEY  (`id`) )
>
> >  CREATE TABLE `judges` (
> >   `person_id` smallint(5) unsigned NOT NULL,
> >   `location_id` smallint(5) unsigned NOT NULL,
> >   `flavor` enum('USDJ','USMJ') default 'USDJ' )
>
> > in the people controller:
> >  var $hasOne = array('judge' => array('className'=> 'judge',
> >   'conditions'   => '',
> >   'order'=> '',
> >   'dependent'=>  true,
> >   'foreignKey'   => 'person_id'
> > )
> >   );
>
> > but i don't know how to insert data in both tables at the same time,
> > how do i configure the add method??? (i can list both tables)- Ocultar 
> > texto de la cita -
>
> - Mostrar texto de la cita -


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



problem with selecttag and generatelist

2007-03-28 Thread christianandradet

hi..
I am trying to generate a list with information based on a table. this
structure is this:
create table CLIENTES
(
   ID intnot
null,
   FUN_ID int,
   CLI_LOGIN  varchar(20),
   CLI_PASSWORD   varchar(20),
   CLI_DIRECCION  varchar(50),
   CLI_TELEFONO   varchar(20),
   CLI_FAXvarchar(15),
   CLI_EMAIL  varchar(20),
   CLI_WWWvarchar(100),
   primary key (ID)
)

create table FUNCIONARIOS
(
   ID intnot
null,
   CAR_ID int,
   FUN_NOMBRE varchar(30),
   FUN_CEDULA varchar(10),
   FUN_TELEFONO   varchar(20),
   FUN_CELULARvarchar(10),
   FUN_DIRECCION  varchar(50),
   FUN_EMAIL  varchar(20),
   FUN_FEC_NACIMIENTO date,
   FUN_FEC_INGRESOdate,
   primary key (ID)
)

now i used this sentences:
add method cliente controller:
$this->set('funcionarios', $this->Cliente->Funcionario-
>generateList(null,null,null,"{n}.funcionarios.id","{n}.funcionarios.fun_nombre"));
the view:
selectTag('cliente/fun_id', $funcionarios,null,$html-
>tagValue('funcionario/id','funcionario/fun_nombre'));?>

this way is not working, but when i use this in the add method:
$this->set('funcionarios', $this->Cliente->Funcionario->query("select
id,fun_nombre from funcionarios order by fun_nombre asc"));
i can fill the list but i get the name of the table and the id and
also the field fun_nombre, something like this:
nombre1
funcionarios
1
nombre2
funcionarios
2

What am i doing wrong?, what's the ideal way to do this??.
Thanks


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



one to one relationship (ADD)

2007-03-26 Thread christianandradet

hi,
i am traing to insert data with a one to one relationship, i am
working with this tables:
 CREATE TABLE 'people` (
  `id` smallint(5) unsigned NOT NULL auto_increment,
  `lastname` varchar(40) NOT NULL,
  `firstname` varchar(40) NOT NULL,
  PRIMARY KEY  (`id`) )

 CREATE TABLE `judges` (
  `person_id` smallint(5) unsigned NOT NULL,
  `location_id` smallint(5) unsigned NOT NULL,
  `flavor` enum('USDJ','USMJ') default 'USDJ' )

in the people controller:
 var $hasOne = array('judge' => array('className'=> 'judge',
  'conditions'   => '',
  'order'=> '',
  'dependent'=>  true,
  'foreignKey'   => 'person_id'
)
  );

but i don't know how to insert data in both tables at the same time,
how do i configure the add method??? (i can list both tables)


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



one to one relationship (ADD)

2007-03-26 Thread christianandradet

hi,
i am traing to insert data with a one to one relationship, i am
working with this tables:
 CREATE TABLE 'people` (
  `id` smallint(5) unsigned NOT NULL auto_increment,
  `lastname` varchar(40) NOT NULL,
  `firstname` varchar(40) NOT NULL,
  PRIMARY KEY  (`id`) )

 CREATE TABLE `judges` (
  `person_id` smallint(5) unsigned NOT NULL,
  `location_id` smallint(5) unsigned NOT NULL,
  `flavor` enum('USDJ','USMJ') default 'USDJ' )

in the people controller:
 var $hasOne = array('judge' => array('className'=> 'judge',
  'conditions'   => '',
  'order'=> '',
  'dependent'=>  true,
  'foreignKey'   => 'person_id'
)
  );

but i don't know how to insert data in both tables at the same time,
how do i configure the add method??? (i can list both tables)


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---