issue with parameters in url

2010-06-08 Thread mdb
Hi All,

I have a banner image in default layout which is displayed on each
page. But when i pass parameters in the URL the image is not
displayed.

Example: /users/index works fine
but
/users/index?id=1 doesnt display the image

Please Help
mdb

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


Re: how to get count of users for each event

2010-04-19 Thread mdb
Hello

Thanks for the reply.

I think i didnt explain properly. The sample you show is for view page
of each event.

But my requirement is for the event display grid where you wont have a
event id

we get all events and display in a grid. In that grid we add one more
column "no. of registrations",
where we get the count of users registered.





On Apr 18, 10:49 pm, nurvzy  wrote:
> I agree with John Andersen, you should use the counterCache in this
> situation, but to answer your question -- how do you preform acount
> in CakePHP from a hasMany relationship -- you get acountlike this:
>
> //in a events_controller.php within
> function view($id){
>   $attendants_count = $this->Event->EventRegistration->find('count',
> array('conditions' => 'EventRegistration.event_id' => $id));
>   $this->set(compact('attendants_count'));}
>
> That's the easiest way to get acountof a hasMany relationship from a
> parent. However, I highly suggest using counterCache so you'll have
> thiscountdata within your parent table (events).
>
> HTH
> Nick
>
> On Apr 15, 4:05 pm, mdb  wrote:
>
>
>
>
>
> > Hello,
>
> > I have Events view.ctp where i display list of Events (Event Name ,
> > Location and Date)
>
> > In EventRegistration table i have the users registered for each event.
> > (Event id , UserId)
>
> > Now in my EventView.ctp i need to add no. of registered users for each
> > event.
>
> > the SQL query will be
>
> > Select a.EventName,a.EventLocation,a.Date,
> > (Selectcount(*) from EventRegistraion b where b.EventId = a.EventID)
> > as userscount
> >  from Events a.
>
> > How do i write the equivalent of this query in cakephp?
>
> > Please Help
>
> 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.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en- Hide quoted text -
>
> - Show quoted text -

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


Re: check querystring

2010-04-15 Thread mdb
Thank you so much that worked.

On Apr 13, 7:28 pm, cricket  wrote:
> On Apr 13, 1:56 pm, mdb  wrote:
>
> > Hello All,
>
> > In my view.ctp i want check if a particular querystring is present, if
> > so then need to assign that value to a local variable.
>
> > Ex
>
> > the url may or may not have the querystring 'eventid', If its present
> > then assing to local variable otherwise no action
>
> if (isset($this->params['url']['event_id']))
> {
>     $event_id = $this->params['url']['event_id'];
>
> }
>
> You can check for $this->params['url']['event_id'] in the 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, reply using "remove me" as the subject.


how to get count of users for each event

2010-04-15 Thread mdb
Hello,

I have Events view.ctp where i display list of Events (Event Name ,
Location and Date)

In EventRegistration table i have the users registered for each event.
(Event id , UserId)

Now in my EventView.ctp i need to add no. of registered users for each
event.

the SQL query will be

Select a.EventName,a.EventLocation,a.Date,
(Select count(*) from EventRegistraion b where b.EventId = a.EventID)
as userscount
 from Events a.

How do i write the equivalent of this query in cakephp?

Please Help

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, reply using "remove me" as the subject.


check querystring

2010-04-13 Thread mdb
Hello All,

In my view.ctp i want check if a particular querystring is present, if
so then need to assign that value to a local variable.

Ex

the url may or may not have the querystring 'eventid', If its present
then assing to local variable otherwise no action


Thanks in advance

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, reply using "remove me" as the subject.


Re: need help saving cross reference table

2010-04-13 Thread mdb
Hello Paul,

Thanks you so much for the reply, that worked.


On Apr 13, 2:12 am, WebbedIT  wrote:
> Hi,
>
> You'd pass the event_id to the controller action by including it inn
> the url:
>
> $html->link('Register', array('controller'=>'events',
> 'action'=>'register', $row['Event']['id']), array('title'=>'Register
> for '.$row['Event']['title']));
>
> The above link would expect to find an action in the Event controller
> starting like:
>
> function register($event_id) {
>   echo $event_id // just to show the event's id has been passed.
>
> }
>
> And you'd access the session data from within the controller action by
> using
>
> $this->Session->read('id')
>
> Not sure about this one to be honest tough, as ever accessed the
> sessions id myself.
>
> HTH
>
> Paul

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, reply using "remove me" as the subject.


need help saving cross reference table

2010-04-09 Thread mdb
Hi All,

I have view.ctp where i'm displaying list of Events
Each event will have a Register link which should insert (eventid and
session user id ) to EventRegistrations table.


I'm new php, so please help me with some sample code...


Thanks In Advance

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, reply using "remove me" as the subject.


Re: Dropdownlist issue

2010-04-04 Thread mdb
Hi,

Thanks. Now I'm getting the dropdown without error. But the dropdown
displays the ID field instead of
categoryname.

Also how do i make the selected categoryid to be stored in the events
table when i click add button

Please help

On Apr 4, 1:38 am, John Andersen  wrote:
> In your EventCategory model, you have to specify that the default
> display name is not "name" but is "categoryname".
> Seehttp://book.cakephp.org/view/71/Model-Attributes#displayField-438
> for information on the models attribute "displayName"
>
> [code]
> var $displayName = 'categoryname';
> [/code]
>
> Then the find('list') will be able to use the correct table column!
>
> Enjoy,
>    John
>
> On Apr 4, 1:10 am, mdb  wrote:
>
>
>
> > Hello
>
> > Thanks for the reply. But i'm very new to php, so let me go one step
> > at a time.
>
> > HABTM in my understanding is to create cross reference tables. (If i'm
> > not right, please correct me)
>
> > But my case is as follows:
>
> > Events is a master table where eventcategoryid is a foreign key
> > column  (which comes from Eventcategory master).
>
> > First i want to make thedropdowndisplay workable properly.
>
> >dropdownis displayed, but for each record there are 3 records in the
> > drop down (1. label, 2. category name and 3. category id) whereas it
> > should be just categoryname as text and id as value.
>
> > I tried
> > $this->set('eventcategories', $this->Event->EventCategory-
>
> > >find('list')); (instead of find('all') which works without error.)
>
> > but if i use 'list' it throws following error:
> > SQL Error: 1064: You have an error in your SQL syntax; check the
> > manual that corresponds to your MySQL server version for the right
> > syntax to use near 'FROM `event_categories` AS `EventCategory`   WHERE
> > 1 = 1' at line 1 [CORE\cake\libs\model\datasources\dbo_source.php,
> > line 666]
>
> > Query: SELECT `EventCategory`.`id`, EventCategory. FROM
> > `event_categories` AS `EventCategory`   WHERE 1 = 1
>
> > its missing eventcategory.categoryname, but i donno y its happening..
>
> > Thanks in advance- Hide quoted text -
>
> - Show quoted text -

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, reply using "remove me" as the subject.


Re: Dropdownlist issue

2010-04-03 Thread mdb
Hello

Thanks for the reply. But i'm very new to php, so let me go one step
at a time.

HABTM in my understanding is to create cross reference tables. (If i'm
not right, please correct me)

But my case is as follows:

Events is a master table where eventcategoryid is a foreign key
column  (which comes from Eventcategory master).

First i want to make the dropdown display workable properly.

dropdown is displayed, but for each record there are 3 records in the
drop down (1. label, 2. category name and 3. category id) whereas it
should be just categoryname as text and id as value.

I tried
$this->set('eventcategories', $this->Event->EventCategory-
>find('list')); (instead of find('all') which works without error.)

but if i use 'list' it throws following error:
SQL Error: 1064: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near 'FROM `event_categories` AS `EventCategory`   WHERE
1 = 1' at line 1 [CORE\cake\libs\model\datasources\dbo_source.php,
line 666]

Query: SELECT `EventCategory`.`id`, EventCategory. FROM
`event_categories` AS `EventCategory`   WHERE 1 = 1

its missing eventcategory.categoryname, but i donno y its happening..


Thanks in advance





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, reply using "remove me" as the subject.


Dropdownlist issue

2010-04-03 Thread mdb
Hi All,

I'm having problem displaying a dropdownlist . basically i'm adding
events to the DB.

The Events entry page has a event category dropdown which also comes
from db.

So in the Events controller add/edit function i have the following
code.

 $this->set('eventcategories', $this->Event->EventCategory-
>find('all'));

and in the Event Model I set
var $belongsTo = array('EventCategory'=>
 
array('className'=>'EventCategory','foreignKey'=>'categoryid'));

Event category model
var $belongsTo = array('Event'=>
array('className'=>'Event','foreignKey'=>'eventid'));

in the add.ctp

 select('eventcategory',$options); ?>

Events category table has 2 records: Major and Minor

the dropdown displays like this

   EventCategory

1

 Major

EventCategory

  2

  Minor

I simply want it to display

   Major
   Minor

with ids(1,2)  as value.. which  should be stored in the Events Table
and on Edit.ctp the saved category to be selected by default.

Please help...

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, reply using "remove me" as the subject.


Authentication Issue

2010-04-01 Thread mdb
Hi,

I'm using cakephp 1.3 and very new to php. I have a basic
Authentication Screen and it works well.

The problem i have is when i login, depending on the roleid of the
user, it should be redirected to different page, which i donno how .

Example

User Table

UserId int pk
username varchar
password varchar
roleid int

Users_Controller

Auth->loginRedirect = array('controller' => 'Users',
'action' => 'index');

}
function index()
{

 $this->set('users', $this->User->find('all'));
}

function login()
{
}
function logout()
{
$this->redirect($this->Auth->logout());
}
}


?>


User Model

 array('rule' =>
'notEmpty','message'=> 'Empty'));}
?>


View


flash('');
$session->flash('auth'); ?>

create('User', array('action' => 'login'));?>

 




User Name:


  input('username',array('label'=>false));?>




Password:


input('password',array('label'=>false));?>




end('Sign In');?>










Now, if the user role is admin I need to redirect to Events, if Member
redirect to Home

Also how do I store the authenticated user in the Session. Its not
happening.



Thanks
MDB

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, reply using "remove me" as the subject.


Pass Session From NON Cakesite to Cakesite

2008-11-11 Thread MDB

Hello all,  I have a site named portal.mysite.com and a site called
cakephp.mysite.com.  My users log into portal.mysite.com so I wanted
them to be able to go directly into the cakephp.mysite.com without re-
logging in.  Is there a way to do this or a setting that I am
missing?  The first site is straight PHP and I create the following
session however, I can not see it when they go to the cake site.

$User = array();
$User['User']['id'] = $sID;
$User['User']['user_type'] = 1;
$User['User']['username'] = $sEmail;
$User['User']['deleted'] = 0;

$_SESSION["Auth"] = $User;
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



habtm deleting all records

2008-11-07 Thread MDB

Hi All, not real sure how I should be setting this up.  I have a join
table called scheduler_customers_tenant_service_approved with the
following 2 columns:

scheduler_customer_id (int)
tenant_service_approved_id (int).

The 2 tables that are being joined are:

table - scheduler_customers
pk = id

table - tenant_service_approved
pk = tenant_service_approved_id
(also has column called tenant_id to associate with tenant table)

I have this in my TenantServiceApproved Model

var $hasAndBelongsToMany = array(
'Customer' => array(
'className' => 'Customer',
'joinTable' => 
'scheduler_customers_tenant_service_approved',
'foreignKey' => 'tenant_service_approved_id',
'associatedForeignKey' => 'customer_id'
)
);

And this is in my Customer model

var $hasAndBelongsToMany = array(
'TenantServiceApproved' => array(
'className' => 'TenantServiceApproved',
'joinTable' => 
'scheduler_customers_tenant_service_approved',
'foreignKey' => 'scheduler_customer_id',
'associatedForeignKey' => 'tenant_service_approved_id',
'conditions' => null,
'fields' => null,
'order' => null,
'limit' => null,
'uniq' => false,
'offset' => null,
'fnderQuery' => null,
'deleteQuery' => null,
'insertQuery' => null
)

);

Now for the problem.  Everything works fine for just one customer and
one tenant but a customer can belong to multiple tenants so when ever
a tenant changes a customer services (TenantServiceApproved) it
deletes all of the records in the
scheduler_customers_tenant_service_approved with that customer id even
though not all of the tenant_service_approved_id's belong to the
tenant that is making the changes.

Does this make since what I am trying to explain?

Basically when a tenant edits a customers service it deletes all
records for the customer rather than just the ones that belong to the
tentant.

In case this helps, I also have a table called tenant with a primary
key of tenant_id.

My tenant model has these associations:

   var $hasAndBelongsToMany = array(
'Customer' =>
 array('className'=> 'Customer',
   'joinTable'=> 'scheduler_customers_tenant',
   'foreignKey'   => 'tenant_id',
   'associationForeignKey'=> 'customer_id')
);

var $hasMany = array(
'TenantServiceApproved' => array(
'className' => 'TenantServiceApproved',
'foreignKey' => 'tenant_id'
));

Then I also have another join tabled called scheduler_customers_tenant
with 2 columns, customer_id (int) and tenant_id (int).


Should any of my associations be changed?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Date Issue (I Think)

2008-11-05 Thread MDB

THANK YOU!

On Nov 5, 2:03 pm, teknoid <[EMAIL PROTECTED]> wrote:
> the > should be on the key side now (due to security fixes)... so
> 'ScheduledItem.start >=' => '2008-11-02'
>
> On Nov 5, 1:47 pm, MDB <[EMAIL PROTECTED]> wrote:
>
>
>
> > This appears to be an issue with the versions. The cake version it
> > works with is 1.2.0.6311 and then the version it doesn't work with is
> > 1.2.0.7296.  Any idea on how I can get this to work with version
> > 1.2.0.7296?  I would like to have both applicaions running on the
> > lastest version however I get a ton of errors when I update the cake
> > files and I do not have enough experience with it to work through them
> > all (in a time crunch).
>
> > On Nov 5, 11:00 am, MDB <[EMAIL PROTECTED]> wrote:
>
> > > Hello all, I have 2 applications that are pretty much set up the same,
> > > when I call this on one application every works fine and data is set:
>
> > >                         $eventsx = $this->ScheduledItem->findAll(
> > >                                 array(
> > >                                 'ScheduledItem.tenant_id' => 
> > > $this->tenantId(),
> > >                                 'ScheduledItem.customer_id' => 
> > > $customerId,
> > >                                 'ScheduledItem.is_cancelled'  => 0,
> > >                                 'ScheduledItem.start' => '>  2008-11-02',
> > >                                 'ScheduledItem.start ' => '< 2008-11-09'
> > >                                 )
> > >                         );
>
> > > Then when I call it from my other application, it will not set any
> > > date unless I remove these 2 lines:
>
> > >                                 'ScheduledItem.start' => '>  2008-11-02',
> > >                                 'ScheduledItem.start ' => '< 2008-11-09'
>
> > > Is their something of configuration issue I am missing?- Hide quoted text 
> > > -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Date Issue (I Think)

2008-11-05 Thread MDB

This appears to be an issue with the versions. The cake version it
works with is 1.2.0.6311 and then the version it doesn't work with is
1.2.0.7296.  Any idea on how I can get this to work with version
1.2.0.7296?  I would like to have both applicaions running on the
lastest version however I get a ton of errors when I update the cake
files and I do not have enough experience with it to work through them
all (in a time crunch).



On Nov 5, 11:00 am, MDB <[EMAIL PROTECTED]> wrote:
> Hello all, I have 2 applications that are pretty much set up the same,
> when I call this on one application every works fine and data is set:
>
>                         $eventsx = $this->ScheduledItem->findAll(
>                                 array(
>                                 'ScheduledItem.tenant_id' => 
> $this->tenantId(),
>                                 'ScheduledItem.customer_id' => $customerId,
>                                 'ScheduledItem.is_cancelled'  => 0,
>                                 'ScheduledItem.start' => '>  2008-11-02',
>                                 'ScheduledItem.start ' => '< 2008-11-09'
>                                 )
>                         );
>
> Then when I call it from my other application, it will not set any
> date unless I remove these 2 lines:
>
>                                 'ScheduledItem.start' => '>  2008-11-02',
>                                 'ScheduledItem.start ' => '< 2008-11-09'
>
> Is their something of configuration issue I am missing?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Date Issue (I Think)

2008-11-05 Thread MDB

Hello all, I have 2 applications that are pretty much set up the same,
when I call this on one application every works fine and data is set:

$eventsx = $this->ScheduledItem->findAll(
array(
'ScheduledItem.tenant_id' => $this->tenantId(),
'ScheduledItem.customer_id' => $customerId,
'ScheduledItem.is_cancelled'  => 0,
'ScheduledItem.start' => '>  2008-11-02',
'ScheduledItem.start ' => '< 2008-11-09'
)
);

Then when I call it from my other application, it will not set any
date unless I remove these 2 lines:

'ScheduledItem.start' => '>  2008-11-02',
'ScheduledItem.start ' => '< 2008-11-09'

Is their something of configuration issue I am missing?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Post Data

2008-10-31 Thread MDB

I figured out the correct name convention.  Thanks


On Oct 31, 8:52 am, MDB <[EMAIL PROTECTED]> wrote:
> Maybe if I explain what I am doing better.  Basically, I have a form
> that asks for a birthday.  We do not want the users to feel
> uncomfortable by asking for thier year of birth so I have two drop
> down boxes, one for the month ( id='PostDobmonth'>) and one for the year ( = 'PostDobday' >).  Then since the  DB field is a date, I and creating
> a default year by doing this:
>
> $this->data['Customer']['dob'] = '1901'.$this-
>
> >form['PostDobmonth'].'-'.$_POST['PostDobday'];
>
> What is the correct format or way to use the form help and dropdown
> boxes like this?
>
> Thanks
>
> On Oct 31, 8:25 am, "Gabriel Gilini" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Are you building your form with the Form Helper? Because it seems to me that
> > there are no naming conventions at all there.
>
> > Cheers
>
> > Gabriel Gilini
>
> >www.usosim.com.br
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
>
> > On Fri, Oct 31, 2008 at 9:46 AM, MDB <[EMAIL PROTECTED]> wrote:
>
> > > The form values do not show up when I do that, they do when I do a
> > > debug($this) and appear like this:
>
> > > [form] => Array
> > >                (
> > >                    [Test1] => 04
> > >                    [Test2] => 05
> > >                )
>
> > > How do I access these values?
> > > I have tried $this->form and $_POST['Test1'] however I always get an
> > > undefined index or property error.
>
> > > On Oct 30, 9:21 pm, thatsgreat2345 <[EMAIL PROTECTED]> wrote:
> > > > add debug($this->data); to your controller that is receiving the
> > > > submitted data. It will display the structure of $this->data
>
> > > > On Oct 30, 6:59 am, MDB <[EMAIL PROTECTED]> wrote:
>
> > > > > How do you get form data that is not part of a controller?  I have a
> > > > > select / drop down box called dobDay, then in the controller, I have
> > > > > tried $this->data['dobDay'], $_POST['dobDay'] and
> > > $this->data['Customer']['dobDay'] (customer = name of form) and nothing
>
> > > > > works.  Can someone please help? TIA- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Post Data

2008-10-31 Thread MDB

Maybe if I explain what I am doing better.  Basically, I have a form
that asks for a birthday.  We do not want the users to feel
uncomfortable by asking for thier year of birth so I have two drop
down boxes, one for the month () and one for the year ().  Then since the  DB field is a date, I and creating
a default year by doing this:

$this->data['Customer']['dob'] = '1901'.$this-
>form['PostDobmonth'].'-'.$_POST['PostDobday'];

What is the correct format or way to use the form help and dropdown
boxes like this?

Thanks


On Oct 31, 8:25 am, "Gabriel Gilini" <[EMAIL PROTECTED]> wrote:
> Are you building your form with the Form Helper? Because it seems to me that
> there are no naming conventions at all there.
>
> Cheers
>
> Gabriel Gilini
>
> www.usosim.com.br
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
>
>
> On Fri, Oct 31, 2008 at 9:46 AM, MDB <[EMAIL PROTECTED]> wrote:
>
> > The form values do not show up when I do that, they do when I do a
> > debug($this) and appear like this:
>
> > [form] => Array
> >                (
> >                    [Test1] => 04
> >                    [Test2] => 05
> >                )
>
> > How do I access these values?
> > I have tried $this->form and $_POST['Test1'] however I always get an
> > undefined index or property error.
>
> > On Oct 30, 9:21 pm, thatsgreat2345 <[EMAIL PROTECTED]> wrote:
> > > add debug($this->data); to your controller that is receiving the
> > > submitted data. It will display the structure of $this->data
>
> > > On Oct 30, 6:59 am, MDB <[EMAIL PROTECTED]> wrote:
>
> > > > How do you get form data that is not part of a controller?  I have a
> > > > select / drop down box called dobDay, then in the controller, I have
> > > > tried $this->data['dobDay'], $_POST['dobDay'] and
> > $this->data['Customer']['dobDay'] (customer = name of form) and nothing
>
> > > > works.  Can someone please help? TIA- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Post Data

2008-10-31 Thread MDB

The form values do not show up when I do that, they do when I do a
debug($this) and appear like this:

[form] => Array
(
[Test1] => 04
[Test2] => 05
)

How do I access these values?
I have tried $this->form and $_POST['Test1'] however I always get an
undefined index or property error.




On Oct 30, 9:21 pm, thatsgreat2345 <[EMAIL PROTECTED]> wrote:
> add debug($this->data); to your controller that is receiving the
> submitted data. It will display the structure of $this->data
>
> On Oct 30, 6:59 am, MDB <[EMAIL PROTECTED]> wrote:
>
>
>
> > How do you get form data that is not part of a controller?  I have a
> > select / drop down box called dobDay, then in the controller, I have
> > tried $this->data['dobDay'], $_POST['dobDay'] and 
> > $this->data['Customer']['dobDay'] (customer = name of form) and nothing
>
> > works.  Can someone please help? TIA- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $form->end('Submit');

2008-10-30 Thread MDB

How do you set the from name then?  This is what my form looks like
now:

echo $form->create(null, array('controller' => 'calendar', 'action' =>
'scheduleCustomerAppointment'));





On Oct 30, 11:45 am, teknoid <[EMAIL PROTECTED]> wrote:
> In order to have your links triggering a form submit, you'll need to
> add some JS.
>
> On Oct 30, 11:25 am, MDB <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello all, is there a way to make this a link rather than a button?- Hide 
> > quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



$form->end('Submit');

2008-10-30 Thread MDB

Hello all, is there a way to make this a link rather than a button?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Post Data

2008-10-30 Thread MDB

How do you get form data that is not part of a controller?  I have a
select / drop down box called dobDay, then in the controller, I have
tried $this->data['dobDay'], $_POST['dobDay'] and $this-
>data['Customer']['dobDay'] (customer = name of form) and nothing
works.  Can someone please help? TIA
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Disable / Hide Login Message

2008-10-22 Thread MDB

I am not setting it all, I am new to cake so I am guessing it is part
of the built in authorization.


On Oct 22, 2:46 pm, gravyface <[EMAIL PROTECTED]> wrote:
> You using session->setFlash()?  You might be able to try
> session->delete('flash') to remove that message where you see fit.  Not
> positive that will work though...
>
>
>
> MDB wrote:
> > Hello all, I have a login page where if the default login fails, it
> > tries using a second login.  Due to this, the "Login failed. Invalid
> > username or password." message appears even if my second login was
> > sucessfull.  So my question is, how do I get rid of this message or
> > hide it?  If I hit refresh in the browser, it does go away.- Hide quoted 
> > text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Disable / Hide Login Message

2008-10-22 Thread MDB

Hello all, I have a login page where if the default login fails, it
tries using a second login.  Due to this, the "Login failed. Invalid
username or password." message appears even if my second login was
sucessfull.  So my question is, how do I get rid of this message or
hide it?  If I hit refresh in the browser, it does go away.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Login Password

2008-10-22 Thread MDB

Thanks

On Oct 22, 1:07 pm, gravyface <[EMAIL PROTECTED]> wrote:
> beforeFilter()
>
>
>
> MDB wrote:
> > Hello all, is there a way to get the login password before it is
> > hashed?  I need to pass the password to a seperate system where the
> > passwords are not hashed so I need both the hashed and unhashed
> > password.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Login Password

2008-10-22 Thread MDB

Hello all, is there a way to get the login password before it is
hashed?  I need to pass the password to a seperate system where the
passwords are not hashed so I need both the hashed and unhashed
password.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Table Join Problem Again

2008-10-20 Thread MDB

Thanks, I will try that out.


On Oct 20, 2:03 pm, "soldier.coder" <[EMAIL PROTECTED]>
wrote:
> Short answer is no, you do not.
>
> EVERY table in cake must have primary key "id" which is autonumber
> int.
>
> When you refer to the primary key of another table, it is that
> tablename + "_id".
>
> On Oct 20, 11:31 am, MDB <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello all, I am having a heck of a time trying to understand how to
> > setup table joins.  First I have the following 3 tables:
>
> > scheduler_customers
> > Primary Key = id
>
> > tenant_service_approved
> > Primary Key = tenant_service_approved_id
>
> > scheduler_customers_tenant_service_approved
> > Columns: scheduler_customer_id,
> > tenant_service_approved_tenant_service_approved_id
>
> > I then have a service model, (it is name service because the table was
> > named services however, there was already a table named
> > tenant_service_approved that already had all of the data) that looks
> > something like this:
>
> > class Service extends AppModel
> > {
>
> >         var $name = 'Service';
> >         var $useTable = 'tenant_service_approved';
> >         var $primaryKey = 'tenant_service_approved_id';
>
> >         var $hasAndBelongsToMany = array(
> >                 'Customer' => array(
> >                         'className' => 'Customer',
> >                         'joinTable' => 
> > 'scheduler_customers_tenant_service_approved',
> >                         'foreignKey' => 'service_id',
> >                         'associatedForeignKey' => 'customer_id'
> >                 )
> >         );
>
> > }
>
> > So my quesetion is do I have the column names set up correctly in the
> > scheduler_customers_tenant_service_approved table and then what is the
> > proper way to set up the hasAndBelongsToMany?  I have tried changing
> > the names over and over however nothing seems to work.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Table Join Problem Again

2008-10-20 Thread MDB

Hello all, I am having a heck of a time trying to understand how to
setup table joins.  First I have the following 3 tables:

scheduler_customers
Primary Key = id

tenant_service_approved
Primary Key = tenant_service_approved_id

scheduler_customers_tenant_service_approved
Columns: scheduler_customer_id,
tenant_service_approved_tenant_service_approved_id

I then have a service model, (it is name service because the table was
named services however, there was already a table named
tenant_service_approved that already had all of the data) that looks
something like this:

class Service extends AppModel
{

var $name = 'Service';
var $useTable = 'tenant_service_approved';
var $primaryKey = 'tenant_service_approved_id';


var $hasAndBelongsToMany = array(
'Customer' => array(
'className' => 'Customer',
'joinTable' => 
'scheduler_customers_tenant_service_approved',
'foreignKey' => 'service_id',
'associatedForeignKey' => 'customer_id'
)
);
}



So my quesetion is do I have the column names set up correctly in the
scheduler_customers_tenant_service_approved table and then what is the
proper way to set up the hasAndBelongsToMany?  I have tried changing
the names over and over however nothing seems to work.





--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Table Rename Join Error

2008-10-17 Thread MDB

I finally figured it out.  I changed the table name
(scheduler_customers_sheduler_services) but I didn't change the column
names to scheduler_customer_id and scheduler_service_id. Once I did
that it started working again.  Thanks again for your help.



On Oct 17, 10:00 am, MDB <[EMAIL PROTECTED]> wrote:
> Okay, here is what I have now and I am no longer getting any error but
> the services for the cusomer are no longer showing.
>
> table customers is now scheduler_customers
> table services is now scheduler_customers
> table customers_services is now scheduler_customers_sheduler_services.
>
> My customer model now looks something like this:
>
> class Customer extends AppModel
> {
>         var $name = 'Customer';
>         var $useTable = 'scheduler_customers';
>
>         var $hasAndBelongsToMany = array(
>                 'Service' => array(
>                         'className' => 'Service',
>                         /*
>                         'joinTable' => 'customers_services',
>                         'foreignKey' => 'customer_id',
>                         'associatedForeignKey' => 'service_id',
>                         */
>                         'joinTable' => null,
>                         'foreignKey' => null,
>                         'associatedForeignKey' => null,
>                         'conditions' => null,
>                         'fields' => null,
>                         'order' => null,
>                         'limit' => null,
>                         'uniq' => true,
>                         'offset' => null,
>                         'fnderQuery' => null,
>                         'deleteQuery' => null,
>                         'insertQuery' => null
>                         )
>                 );
>
> }
>
> and my service model looks like this:
>
> class Service extends AppModel
> {
>         var $name = 'Service';
>         var $useTable = 'scheduler_services';
>
>         var $hasAndBelongsToMany = array(
>                 'Customer' => array(
>                         'className' => 'Customer',
>                         'joinTable' => 
> 'scheduler_customers_scheduler_services',
>                         'foreignKey' => 'service_id',
>                         'associatedForeignKey' => 'customer_id'
>                 )
>         );
>
> }
>
> Once again, in short, I changed the table names and set the useTable
> and now the services no longer show.  Not real sure what else I should
> look for?
>
> On Oct 17, 9:28 am, MDB <[EMAIL PROTECTED]> wrote:
>
>
>
> > Thank you, that fixed the error however now the services are not
> > showing for the customer. Is there something else that I am missing?
>
> > On Oct 17, 9:14 am, scs <[EMAIL PROTECTED]> wrote:
>
> > > Cake handles the join table naming convention based off the tables
> > > used, rename your join table to customers_scheduler_services
>
> > > On Oct 17, 8:22 am, MDB <[EMAIL PROTECTED]> wrote:
>
> > > > Being new to cake (became the owner of 2 cakephp applications), I dont
> > > > think I am getting something simple.  First, I have three tables,
> > > > customers (PK ID int), services (PK ID int) and then
> > > > customers_services (customer_id int, service_id int).  I then have the
> > > > 2 models below.  I am in the process of moving this application over
> > > > to another DB and I have to change the tables names  so, I first
> > > > changed the services table to scheduler_services and then in the
> > > > service model I changed it to use the correct table name (var
> > > > $useTable = 'scheduler_services').  Once I did this, I am now getting
> > > > this error:
>
> > > > Missing Database Table
> > > > Error: Database table customers_scheduler_services for model
> > > > CustomersSchedulerService was not found.
>
> > > > I am guessing it has something to do with the table join however can
> > > > not figure it out.  I changed other table names without a problem
> > > > however this is the only one that has a join to it.
>
> > > > Service Model
>
> > > > class Service extends AppModel
> > > &g

Re: Table Rename Join Error

2008-10-17 Thread MDB

Okay, here is what I have now and I am no longer getting any error but
the services for the cusomer are no longer showing.

table customers is now scheduler_customers
table services is now scheduler_customers
table customers_services is now scheduler_customers_sheduler_services.

My customer model now looks something like this:

class Customer extends AppModel
{
var $name = 'Customer';
var $useTable = 'scheduler_customers';

var $hasAndBelongsToMany = array(
'Service' => array(
'className' => 'Service',
/*
'joinTable' => 'customers_services',
'foreignKey' => 'customer_id',
'associatedForeignKey' => 'service_id',
*/
'joinTable' => null,
'foreignKey' => null,
'associatedForeignKey' => null,
'conditions' => null,
'fields' => null,
'order' => null,
'limit' => null,
'uniq' => true,
'offset' => null,
'fnderQuery' => null,
'deleteQuery' => null,
'insertQuery' => null
)
);

}

and my service model looks like this:

class Service extends AppModel
{
var $name = 'Service';
var $useTable = 'scheduler_services';

var $hasAndBelongsToMany = array(
'Customer' => array(
'className' => 'Customer',
'joinTable' => 'scheduler_customers_scheduler_services',
'foreignKey' => 'service_id',
'associatedForeignKey' => 'customer_id'
)
);

}


Once again, in short, I changed the table names and set the useTable
and now the services no longer show.  Not real sure what else I should
look for?

On Oct 17, 9:28 am, MDB <[EMAIL PROTECTED]> wrote:
> Thank you, that fixed the error however now the services are not
> showing for the customer. Is there something else that I am missing?
>
> On Oct 17, 9:14 am, scs <[EMAIL PROTECTED]> wrote:
>
>
>
> > Cake handles the join table naming convention based off the tables
> > used, rename your join table to customers_scheduler_services
>
> > On Oct 17, 8:22 am, MDB <[EMAIL PROTECTED]> wrote:
>
> > > Being new to cake (became the owner of 2 cakephp applications), I dont
> > > think I am getting something simple.  First, I have three tables,
> > > customers (PK ID int), services (PK ID int) and then
> > > customers_services (customer_id int, service_id int).  I then have the
> > > 2 models below.  I am in the process of moving this application over
> > > to another DB and I have to change the tables names  so, I first
> > > changed the services table to scheduler_services and then in the
> > > service model I changed it to use the correct table name (var
> > > $useTable = 'scheduler_services').  Once I did this, I am now getting
> > > this error:
>
> > > Missing Database Table
> > > Error: Database table customers_scheduler_services for model
> > > CustomersSchedulerService was not found.
>
> > > I am guessing it has something to do with the table join however can
> > > not figure it out.  I changed other table names without a problem
> > > however this is the only one that has a join to it.
>
> > > Service Model
>
> > > class Service extends AppModel
> > > {
> > >         var $name = 'Service';
> > >         var $useTable = 'scheduler_services';
>
> > >         var $hasAndBelongsToMany = array(
> > >                 'Customer' => array(
> > >                         'className' => 'Customer',
> > >                         'joinTable' => 'customers_services',
> > >                         'foreignKey' => 'service_id',
> > >                         'associatedForeignKey' => 'customer_id'
> > >                 )
> > >         );
>
> > > }
>
> > > Customer 

Re: Table Rename Join Error

2008-10-17 Thread MDB

Thank you, that fixed the error however now the services are not
showing for the customer. Is there something else that I am missing?


On Oct 17, 9:14 am, scs <[EMAIL PROTECTED]> wrote:
> Cake handles the join table naming convention based off the tables
> used, rename your join table to customers_scheduler_services
>
> On Oct 17, 8:22 am, MDB <[EMAIL PROTECTED]> wrote:
>
>
>
> > Being new to cake (became the owner of 2 cakephp applications), I dont
> > think I am getting something simple.  First, I have three tables,
> > customers (PK ID int), services (PK ID int) and then
> > customers_services (customer_id int, service_id int).  I then have the
> > 2 models below.  I am in the process of moving this application over
> > to another DB and I have to change the tables names  so, I first
> > changed the services table to scheduler_services and then in the
> > service model I changed it to use the correct table name (var
> > $useTable = 'scheduler_services').  Once I did this, I am now getting
> > this error:
>
> > Missing Database Table
> > Error: Database table customers_scheduler_services for model
> > CustomersSchedulerService was not found.
>
> > I am guessing it has something to do with the table join however can
> > not figure it out.  I changed other table names without a problem
> > however this is the only one that has a join to it.
>
> > Service Model
>
> > class Service extends AppModel
> > {
> >         var $name = 'Service';
> >         var $useTable = 'scheduler_services';
>
> >         var $hasAndBelongsToMany = array(
> >                 'Customer' => array(
> >                         'className' => 'Customer',
> >                         'joinTable' => 'customers_services',
> >                         'foreignKey' => 'service_id',
> >                         'associatedForeignKey' => 'customer_id'
> >                 )
> >         );
>
> > }
>
> > Customer Model
>
> > class Customer extends AppModel
> > {
> >         var $name = 'Customer';
> >         var $actsAs = array('SoftDeletable');
>
> >         var $hasAndBelongsToMany = array(
> >                 'Service' => array(
> >                         'className' => 'Service',
> >                         /*
> >                         'joinTable' => 'customers_services',
> >                         'foreignKey' => 'customer_id',
> >                         'associatedForeignKey' => 'service_id',
> >                         */
> >                         'joinTable' => null,
> >                         'foreignKey' => null,
> >                         'associatedForeignKey' => null,
> >                         'conditions' => null,
> >                         'fields' => null,
> >                         'order' => null,
> >                         'limit' => null,
> >                         'uniq' => true,
> >                         'offset' => null,
> >                         'fnderQuery' => null,
> >                         'deleteQuery' => null,
> >                         'insertQuery' => null
> >                 )
> >         );
>
> > }
>
> > If anyone can help I would greatly appreciate it.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Table Rename Join Error

2008-10-17 Thread MDB

Being new to cake (became the owner of 2 cakephp applications), I dont
think I am getting something simple.  First, I have three tables,
customers (PK ID int), services (PK ID int) and then
customers_services (customer_id int, service_id int).  I then have the
2 models below.  I am in the process of moving this application over
to another DB and I have to change the tables names  so, I first
changed the services table to scheduler_services and then in the
service model I changed it to use the correct table name (var
$useTable = 'scheduler_services').  Once I did this, I am now getting
this error:

Missing Database Table
Error: Database table customers_scheduler_services for model
CustomersSchedulerService was not found.

I am guessing it has something to do with the table join however can
not figure it out.  I changed other table names without a problem
however this is the only one that has a join to it.

Service Model

class Service extends AppModel
{
var $name = 'Service';
var $useTable = 'scheduler_services';

var $hasAndBelongsToMany = array(
'Customer' => array(
'className' => 'Customer',
'joinTable' => 'customers_services',
'foreignKey' => 'service_id',
'associatedForeignKey' => 'customer_id'
)
);
}


Customer Model

class Customer extends AppModel
{
var $name = 'Customer';
var $actsAs = array('SoftDeletable');


var $hasAndBelongsToMany = array(
'Service' => array(
'className' => 'Service',
/*
'joinTable' => 'customers_services',
'foreignKey' => 'customer_id',
'associatedForeignKey' => 'service_id',
*/
'joinTable' => null,
'foreignKey' => null,
'associatedForeignKey' => null,
'conditions' => null,
'fields' => null,
'order' => null,
'limit' => null,
'uniq' => true,
'offset' => null,
'fnderQuery' => null,
'deleteQuery' => null,
'insertQuery' => null
)
);
}

If anyone can help I would greatly appreciate it.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Join Table Problem

2008-10-16 Thread MDB

Okay, I changed the customer hasand belongstomany to this:

var $hasAndBelongsToMany = array(
'Service' => array(
'className' => 'Service',
'joinTable' => 'scheduler_customers_services',
'foreignKey' => 'customer_id',
'associatedForeignKey' => 'service_id'
)
);

Not real sure why it was working like the one above before but it was,
the only thing I have done was change the table names to make them
more distinct (added scheduler to begining of name).  So now, I am no
longer getting the error but the scheduler_customers_services never
gets updated with customer id and service ids.  What is the best way
to update tables like this?





On Oct 16, 3:21 pm, MDB <[EMAIL PROTECTED]> wrote:
> Hello all, I have 3 tables:
>
> scheduler_customers_services (customer_id int, service_id int)
> scheduler_services (id int)
> scheduler_customers (id int)
>
> My models looks something like this:
>
> class Service extends AppModel
> {
>         var $name = 'Service';
>         var $useTable = 'scheduler_services';
>         var $primaryKey = 'id';
>
>         var $hasAndBelongsToMany = array(
>                 'Customer' => array(
>                         'className' => 'Customer',
>                         'joinTable' => 'scheduler_customers_services',
>                         'foreignKey' => 'service_id',
>                         'associatedForeignKey' => 'customer_id'
>                 )
>         );
>
> }
>
> ?>
>
> class Customer extends AppModel
> {
>         var $name = 'Customer';
>         var $useTable = 'scheduler_customers';
>         var $primaryKey = 'id';
>
>         var $hasAndBelongsToMany = array(
>                 'Service' => array(
>                         'className' => 'Service',
>                         'joinTable' => 'scheduler_customers_services',
>                         'foreignKey' => 'customer_id',
>                         'associatedForeignKey' => 'service_id',
>                         'joinTable' => null,
>                         'foreignKey' => null,
>                         'associatedForeignKey' => null,
>                         'conditions' => null,
>                         'fields' => null,
>                         'order' => null,
>                         'limit' => null,
>                         'uniq' => true,
>                         'offset' => null,
>                         'fnderQuery' => null,
>                         'deleteQuery' => null,
>                         'insertQuery' => null
>                 )
>         );}
>
> ?>
>
> I am getting the following error and can not seem to figure out why?
>
> Error: Database table scheduler_customers_scheduler_services for model
> SchedulerCustomersSchedulerService was not found.
>
> I am new to cakephp and took over this project from someone else so if
> anyone can help, I would greatly appreciate it.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Join Table Problem

2008-10-16 Thread MDB

Hello all, I have 3 tables:

scheduler_customers_services (customer_id int, service_id int)
scheduler_services (id int)
scheduler_customers (id int)

My models looks something like this:

class Service extends AppModel
{
var $name = 'Service';
var $useTable = 'scheduler_services';
var $primaryKey = 'id';

var $hasAndBelongsToMany = array(
'Customer' => array(
'className' => 'Customer',
'joinTable' => 'scheduler_customers_services',
'foreignKey' => 'service_id',
'associatedForeignKey' => 'customer_id'
)
);
}

?>

class Customer extends AppModel
{
var $name = 'Customer';
var $useTable = 'scheduler_customers';
var $primaryKey = 'id';

var $hasAndBelongsToMany = array(
'Service' => array(
'className' => 'Service',
'joinTable' => 'scheduler_customers_services',
'foreignKey' => 'customer_id',
'associatedForeignKey' => 'service_id',
'joinTable' => null,
'foreignKey' => null,
'associatedForeignKey' => null,
'conditions' => null,
'fields' => null,
'order' => null,
'limit' => null,
'uniq' => true,
'offset' => null,
'fnderQuery' => null,
'deleteQuery' => null,
'insertQuery' => null
)
);
}
?>


I am getting the following error and can not seem to figure out why?

Error: Database table scheduler_customers_scheduler_services for model
SchedulerCustomersSchedulerService was not found.


I am new to cakephp and took over this project from someone else so if
anyone can help, I would greatly appreciate it.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Naming Conventions

2008-10-16 Thread MDB

Thanks

On Oct 16, 12:44 pm, on24nl <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Just specify it in your model.
>
> class Example extends AppModel {
> var $useTable = 'othername';
>
> }
>
> Regars,
>
> Jeroen
>
> On 16 okt, 17:48, MDB <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello all,  I have a cake application that I need to add an existing
> > table to that doesn't follow the cake naming convention and I am
> > unable to change the table name so my question is, how do I work
> > around this.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Naming Conventions

2008-10-16 Thread MDB

Hello all,  I have a cake application that I need to add an existing
table to that doesn't follow the cake naming convention and I am
unable to change the table name so my question is, how do I work
around this.  For example, the table name is service (rather than
services) so do to this, I can not figure out how to name the
controller, controller class or if this is even possible?  Is there a
way to do this where the naming conventions are not used on all tables?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Simple Question

2008-10-03 Thread MDB

Hello all, how do I get the selected value from a select drop down
box.  Basically I want to redirect based on the returned value however
I can not figure out how to get the selected value?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Index / Url Error?

2008-10-03 Thread MDB

I am new to this, I just took over this site which was written in
cakephp and I have never seen or used it before.

On Oct 2, 8:54 pm, "3lancer.eu" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Well, I don't know why do you expect that to work. Please read the
> chapter on routes:http://book.cakephp.org/view/46/Routes-Configuration
>
> You would save some work if you followed cake url conventions.
>
> Regards,
> Piotr
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Index / Url Error?

2008-10-02 Thread MDB

Hello All, I am not real sure what I am doing wrong.  I have a login
page that I am trying to pass an OwnerID to since it is coming from
another site and I am getting the below error.  How can I pass a
querystring to a starting page?


Here is what the url looks like:

http://mySite.com/OwnerID=273

The Error I am getting:

Error: OwnerID273Controller could not be found.
Error: Create the class OwnerID273Controller below in file: app
\controllers\owner_i_d273_controller.php


Thanks
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Form Style

2008-10-02 Thread MDB

Thanks


On Oct 2, 1:35 pm, teknoid <[EMAIL PROTECTED]> wrote:
> Loook at the supplied CSS file.
> If you use $form->input() it will add some div's, which allow you a
> very flexible control over the form display.
> You can disable that, but really it's not a semantic approach to place
> your form elements inside of tables.
>
> On Oct 2, 12:54 pm, MDB <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello all, how do I remove the form style?  For example, I have a form
> > that gathers user information (name, address, ect) with each input in
> > a row / cell.  I have the table set to 0 cell padding however there is
> > a ton of space between each row which make it look way too big.- Hide 
> > quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Form Style

2008-10-02 Thread MDB

Hello all, how do I remove the form style?  For example, I have a form
that gathers user information (name, address, ect) with each input in
a row / cell.  I have the table set to 0 cell padding however there is
a ton of space between each row which make it look way too big.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Updating Radio Buttons

2008-09-29 Thread MDB

Hello All, I have a form that is filled with radio buttons which each
represents a time.  What is the best way to loop through these radio
buttons enabling and disabling depending on other factors? Does this
go in the controller and if so, how do I go about this?  Any links or
pointers would greatly be appreciated.

TIA

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---