In store_types tbl primary key is store_type_id

On Tue, May 11, 2010 at 8:04 PM, John Andersen <[email protected]>wrote:

> As the error says, the table store_types has no column id, which is
> expected, as you have defined that the StoreType model has a primary
> key named store_type_id!
>
> What is the name of the column which is the primary key in the table
> store_types?
> Enjoy,
>   John
>
> On May 11, 4:29 pm, Ambika Kulkarni <[email protected]>
> wrote:
> > SELECT `Store`.`store_id`, `Store`.`branch_code`,
> > `Store`.`store_code`, `Store`.`store_name`, `Store`.`store_type_id`,
> > `Store`.`grm`, `Store`.`lngbranchmanager`, `Store`.`assistant`,
> > `Store`.`lngconregion`, `Store`.`division_id`,
> > `Store`.`division_zapop_id`, `Store`.`region_id`,
> > `Store`.`telcountry`, `Store`.`telarea`, `Store`.`tel`,
> > `Store`.`faxcountry`, `Store`.`faxarea`, `Store`.`fax`,
> > `Store`.`address1`, `Store`.`address2`, `Store`.`address3`,
> > `Store`.`address4`, `Store`.`address5`, `Store`.`po_code`,
> > `Store`.`email`, `Store`.`contact_number`, `Store`.`basevolume`,
> > `Store`.`base_announcement`, `Store`.`virt`, `Store`.`active`,
> > `Store`.`country_id`, `Store`.`weight`, `Store`.`trade_area`,
> > `Store`.`monthly_store`, `Store`.`wine_store`, `Store`.`unavailable`,
> > `Store`.`store_closed`, `Division`.`division_id`, `Division`.`name`,
> > `StoreType`.`store_type_id`, `StoreType`.`name` FROM `stores` AS
> > `Store` LEFT JOIN `divisions` AS `Division` ON (`Store`.`division_id`
> > = `Division`.`division_id`) LEFT JOIN `store_types` AS `StoreType` ON
> > (`Store`.`store_type_id` = `StoreType`.`id`)  WHERE 1 = 1
> >
> > This is query that it it returning after the error
> >
>
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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 [email protected]
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

Reply via email to