Missing Database Table, two models are joined and asking new table

2014-04-26 Thread Dakota
You need to obviously create the missing table. Read up on HABTM relations 
(http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#hasandbelongstomany-habtm)

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Missing Database Table, two models are joined and asking new table

2014-04-25 Thread Marcelo F Andrade
On Fri, Apr 25, 2014 at 3:25 AM, mdv  wrote:
> I have 2 models - Issue and Publication
> But cakePHP is showing Error: Table issue_publications for model
> IssuePublication was not found in datasource default

Give us more details.  How these two models are related?

Regards.

MARCELO F ANDRADE | Belem, Amazonia, Brazil | http://about.me/mfandrade

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Missing Database Table, two models are joined and asking new table

2014-04-24 Thread mdv
I have 2 models - Issue and Publication
But cakePHP is showing *Error: * Table *issue_publications* for model 
*IssuePublication* was not found in datasource *default*

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Missing Database Table

2011-08-16 Thread Jeremy Burns | Class Outfit
Also check the location of your socket (check php.ini by echoing phpinfo();) 
and make sure it matches.

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 16 Aug 2011, at 14:50, Dr. Loboto wrote:

> Did you correct database name in database.php ? Cake says "table not
> found" also in case of not found database.
> 
> On 15 авг, 18:47, culp  wrote:
>> Hello, I'm new to cake so please bear with me here.
>> 
>> I've set up an application locally, tested it and all runs fine.  I've
>> uploaded it to a remote production server and, with exactly the same
>> settings I'm getting the following error message
>> 
>> Missing Database Table
>> 
>> Error: Database table shipments for model Shipment was not found.
>> 
>> Troubleshooting so far:-
>> 
>> I've checked through phpmyadmin and the table does exist.
>> 
>> I've cross checked core.php and phpmyadmin and the database names do
>> match
>> 
>> I've emptied the tmp/cache directories on the remote server.
>> 
>> I've uncommented the line "Configure::write('Cache.disable', true);"
>> in core.php
>> 
>> Configure::write('debug', 3); on the remote site.
>> 
>> Stilll having the same error messages.
>> 
>> Possible theories:-
>> 
>> The database name is "gacworld_shipments" the table name is
>> "shipments" on the remote server, is the similar name causing a clash?
>> My local version that works has a database named gacworldwide.
>> 
>> On my local version I'm using the root mysql user, on the remote
>> version I'm not, is it some sort of user priviledge problem?
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Missing Database Table

2011-08-16 Thread Dr. Loboto
Did you correct database name in database.php ? Cake says "table not
found" also in case of not found database.

On 15 авг, 18:47, culp  wrote:
> Hello, I'm new to cake so please bear with me here.
>
> I've set up an application locally, tested it and all runs fine.  I've
> uploaded it to a remote production server and, with exactly the same
> settings I'm getting the following error message
>
> Missing Database Table
>
> Error: Database table shipments for model Shipment was not found.
>
> Troubleshooting so far:-
>
> I've checked through phpmyadmin and the table does exist.
>
> I've cross checked core.php and phpmyadmin and the database names do
> match
>
> I've emptied the tmp/cache directories on the remote server.
>
> I've uncommented the line "Configure::write('Cache.disable', true);"
> in core.php
>
> Configure::write('debug', 3); on the remote site.
>
> Stilll having the same error messages.
>
> Possible theories:-
>
> The database name is "gacworld_shipments" the table name is
> "shipments" on the remote server, is the similar name causing a clash?
> My local version that works has a database named gacworldwide.
>
> On my local version I'm using the root mysql user, on the remote
> version I'm not, is it some sort of user priviledge problem?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Missing Database Table

2011-08-15 Thread culp
Hello, I'm new to cake so please bear with me here.

I've set up an application locally, tested it and all runs fine.  I've
uploaded it to a remote production server and, with exactly the same
settings I'm getting the following error message

Missing Database Table

Error: Database table shipments for model Shipment was not found.

Troubleshooting so far:-

I've checked through phpmyadmin and the table does exist.

I've cross checked core.php and phpmyadmin and the database names do
match

I've emptied the tmp/cache directories on the remote server.

I've uncommented the line "Configure::write('Cache.disable', true);"
in core.php

Configure::write('debug', 3); on the remote site.

Stilll having the same error messages.

Possible theories:-

The database name is "gacworld_shipments" the table name is
"shipments" on the remote server, is the similar name causing a clash?
My local version that works has a database named gacworldwide.

On my local version I'm using the root mysql user, on the remote
version I'm not, is it some sort of user priviledge problem?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Missing Database Table

2011-02-18 Thread sanjibdhar...@gmail.com
Check all are right or not.My db config is "/app/config/database.php"
class DATABASE_CONFIG {
var $default = array(
'driver' => 'mysql_ex',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'sif_dev',
'prefix' => '',
);

var $test = array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'test_database_name',
'prefix' => '',
);
}

Please reply if solved with how have u solved it.

On Feb 18, 10:56 pm, "Dr. Loboto"  wrote:
> If all tables seems missing there are several possibilities:
>
> 1. App cannot cannot connect to DB (unfortunately Cake do not have
> separate error message for this case);
> 2. You select wrong database;
> 3. MySQL users rights are messed and you can connect, choose DB, but
> cannot select from tables there.
>
> On 18 фев, 14:54, Ed Propsner  wrote:
>
>
>
>
>
>
>
> > I know this a common error but I'm not seeing what I'm overlooking here.
> > I uploaded a project to remote server and the app complains that I'm missing
> > DB tables.
> > I assumed it was the cache and emptied it out but the problem still
> > persists.
> > The tables are there so that is not the issue.
> > The app appears to be connected to the DB.
> > It seems to be not just one or two tables it thinks are missing, but all
> > tables.
>
> > Thanks in advance,
> > Ed

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Missing Database Table

2011-02-18 Thread Dr. Loboto
If all tables seems missing there are several possibilities:

1. App cannot cannot connect to DB (unfortunately Cake do not have
separate error message for this case);
2. You select wrong database;
3. MySQL users rights are messed and you can connect, choose DB, but
cannot select from tables there.

On 18 фев, 14:54, Ed Propsner  wrote:
> I know this a common error but I'm not seeing what I'm overlooking here.
> I uploaded a project to remote server and the app complains that I'm missing
> DB tables.
> I assumed it was the cache and emptied it out but the problem still
> persists.
> The tables are there so that is not the issue.
> The app appears to be connected to the DB.
> It seems to be not just one or two tables it thinks are missing, but all
> tables.
>
> Thanks in advance,
> Ed

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Missing Database Table

2011-02-18 Thread Jeremy Burns | Class Outfit
Are you seeing some but not all tables, or none at all?

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 18 Feb 2011, at 08:55, Tilen Majerle wrote:

> you maybe connect to mysql server, but did u select right database?
> --
> Lep pozdrav, Tilen Majerle
> http://majerle.eu
> 
> 
> 
> 2011/2/18 Ed Propsner 
> I know this a common error but I'm not seeing what I'm overlooking here. 
> I uploaded a project to remote server and the app complains that I'm missing 
> DB tables. 
> I assumed it was the cache and emptied it out but the problem still persists. 
> The tables are there so that is not the issue. 
> The app appears to be connected to the DB. 
> It seems to be not just one or two tables it thinks are missing, but all 
> tables. 
> 
> Thanks in advance, 
> Ed 
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> 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
> 
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Missing Database Table

2011-02-18 Thread Tilen Majerle
you maybe connect to mysql server, but did u select right database?
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/2/18 Ed Propsner 

> I know this a common error but I'm not seeing what I'm overlooking here.
> I uploaded a project to remote server and the app complains that I'm
> missing DB tables.
> I assumed it was the cache and emptied it out but the problem still
> persists.
> The tables are there so that is not the issue.
> The app appears to be connected to the DB.
> It seems to be not just one or two tables it thinks are missing, but all
> tables.
>
> Thanks in advance,
> Ed
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Missing Database Table

2011-02-18 Thread Ed Propsner
I know this a common error but I'm not seeing what I'm overlooking here.
I uploaded a project to remote server and the app complains that I'm missing
DB tables.
I assumed it was the cache and emptied it out but the problem still
persists.
The tables are there so that is not the issue.
The app appears to be connected to the DB.
It seems to be not just one or two tables it thinks are missing, but all
tables.

Thanks in advance,
Ed

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Bake, Missing database table error.

2010-08-04 Thread Staple
I have a similar thing..see below - I am unsure where it is getting
"Customer" from - the intention is that a "Business" can have many
"Business Customers" ... any help much appreciated..I am learning
Cakephp and it is fantastic.

Bake All
--
Use Database Config: (default/test)
[default] >
Possible Models based on your current database:
1. Aco
2. Aro
3. ArosAco
4. BusinessCustomer
5. BusinessUnit
6. Business
7. Group
8. Post
9. ServiceEvent
10. ServiceScheduled
11. Service
12. User
13. Widget
Enter a number from the list above,
type in the name of another model, or 'q' to exit
[q] > 6
Error: Missing database table 'customers' for model 'Customer'



SQL

--
-- Table structure for table `businesses`
--

CREATE TABLE IF NOT EXISTS `businesses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

-- 

--
-- Table structure for table `business_customers`
--

CREATE TABLE IF NOT EXISTS `business_customers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `business_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `address` varchar(255) NOT NULL,
  `phone` varchar(255) NOT NULL,
  `crm_link` varchar(255) DEFAULT NULL,
  `note` varchar(255) DEFAULT NULL,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

-- 

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: Bake, Missing database table error.

2010-07-05 Thread Jeremy Burns | Class Outfit
It is assuming that ApplicantsGuardian is part of a $hasAndBelongsToMany 
relationship between Applicants and Guardians. Rename it ApplicantGuardian and 
try again.

Sent from my iPad

On 5 Jul 2010, at 10:58, Sid  wrote:

> Hi,
> 
> I am trying to bake the models, controller and views based on some
> tables I have created in a MySQL database. I have followed CakePHP's
> table naming conventions, ie named the tables in their plural form.
> However when I try bake all, it works for some tables but it is giving
> a weird error for some tables;
> 
> "Use Database Config: (default/test)
> [default] > default
> Possible Models based on your current database:
> 1. ApplicantsGuardian
> 2. Application
> 3. Assessment
> 4. Brother
> 5. EntryRequirement
> 6. FeePayment
> 7. Fee
> 8. Guardian
> 9. Interview
> 10. School
> 11. Student
> 12. YearGroup
> Enter a number from the list above,
> type in the name of another model, or 'q' to exit
> [q] > 11
> Error: Missing database table 'applicants' for model 'Applicant'"
> 
> I don't know where it is getting 'applicants' from?
> 
> Appreciate any help.
> 
> Many thanks,
> 
> Sid.
> 
> 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

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


Bake, Missing database table error.

2010-07-05 Thread Sid
Hi,

I am trying to bake the models, controller and views based on some
tables I have created in a MySQL database. I have followed CakePHP's
table naming conventions, ie named the tables in their plural form.
However when I try bake all, it works for some tables but it is giving
a weird error for some tables;

"Use Database Config: (default/test)
[default] > default
Possible Models based on your current database:
1. ApplicantsGuardian
2. Application
3. Assessment
4. Brother
5. EntryRequirement
6. FeePayment
7. Fee
8. Guardian
9. Interview
10. School
11. Student
12. YearGroup
Enter a number from the list above,
type in the name of another model, or 'q' to exit
[q] > 11
Error: Missing database table 'applicants' for model 'Applicant'"

I don't know where it is getting 'applicants' from?

Appreciate any help.

Many thanks,

Sid.

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: ORACLE - missing database table

2010-06-17 Thread cricket
On Jun 17, 5:24 am, Florian  wrote:
>
> Warning (512): SQL Error: ORA-00936: Ausdruck fehlt [CORE\cake\libs
> \model\datasources\dbo_source.php, line 527]
> Query: SELECT FROM connection_settings ConnectionSetting WHERE 1 = 1

Missing expression, not table. Search for ORA-00936, it is "missing
expression" and it looks like it's missing something between SELECT
and FROM (but I know little about Oracle so I'm guessing). Maybe the
problem is with the DboOracle class.

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


ORACLE - missing database table

2010-06-17 Thread Florian
Hello everyone,

i ran into some trouble when switching from mySQL to ORACLE.

In mySQL i created the table names in lower case.
Now after switching to ORACLE it's seems CAKE has some problems to
find the tables inside ORACLE, table names also lower case.

my dbconfig looks like:

var $default = array(
'driver' => 'oracle',
'connect' => 'oci_connect',
'persistent' => false,
'host' => '',
'login' => 'user',
'password' => 'password',
'database' => 'host:port/XE',
'prefix' => '',
);

ERROR:

Warning (512): SQL Error: ORA-00936: Ausdruck fehlt [CORE\cake\libs
\model\datasources\dbo_source.php, line 527]
Query: SELECT FROM connection_settings ConnectionSetting WHERE 1 = 1

IMHO DECRIBE table to get column names for the SELECT doesn't work.


any suggestion???

Florian

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: Missing Database Table error

2010-06-11 Thread Andrew
OK I've now worked out 100% what my problem was!

The problem was because my two Models (vote & user) were using
$hasAndBelongsToMany  they did not have to have the Full classname in,
for instance:

class User extends AppModel
{
var $name = 'User';
 var $hasAndBelongsToMany = array(
'UserVote' => array(
'className' => 'UserVote',
'foreignKey' => 'user_id',
'dependent' => true
)
);
}



And I changed this to---

class User extends AppModel
{
var $name = 'User';
 var $hasAndBelongsToMany = array(
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id',
'dependent' => true
)
);
}

And it worked. That was the answer!


On Jun 12, 11:36 am, Andrew  wrote:
> Thank you.
> After many different tries I ended up renaming my table to user_votes
> and everything seemed to work at last.
>
> It does get confusing!
>
> On Jun 12, 10:01 am, Dima  wrote:
>
>
>
> > You can include the following in your model to specify the name of the
> > table to use if you do not want to follow Cake's naming convention.
> > Try this:
>
> > [code]
> > var $useTable = ;
> > [/code]
>
> > So your model will look something like this:
>
> > [code]
> > class User extends AppModel
> > {
> >    var $name = 'User';
> >    var $useTable = 'user_votes';
> >    var $hasAndBelongsToMany = array(
> >       'UserVote' => array(
> >          'className' => 'UserVote',
> >          'foreignKey' => 'user_id',
> >          'dependent' => true
> >       )
> >    );}
>
> > [/code]
>
> > Hope this helps,
> > Dima
>
> > On Jun 11, 4:55 pm, Ed Propsner  wrote:
>
> > > All of my underscored table names work just fine, but this is something I
> > > wonder about:
>
> > > If both parts of the underscored table name are plural (users_votes) ..
> > > would the model be UsersVote or UserVote. Do both parts get singularized?
>
> > > In any case, your issue still seems to be with naming conventions.
>
> > > - Ed
>
> > > On Fri, Jun 11, 2010 at 5:43 PM, Jonathon Musters 
> > > wrote:
>
> > > > I think the new table should be called UsersVotes. No underscore.
>
> > > > On 6/11/10, Andrew  wrote:
> > > > > Hello all,
>
> > > > > I've been using cakephp for a few months now and I love it!! I must
> > > > > admit I am still getting used to some of the concepts. At the moment
> > > > > I'm trying to add a database bridging table for a HasAndBelongsToMany
> > > > > Model. My three models involved are Users, Votes and Users_Votes.
>
> > > > > So when I call the view /users_votes/create/ I get the error message
>
> > > > > Missing Database Table
> > > > > Error: Database table user_votes for model UserVote was not found.
> > > > > Notice: If you want to customize this error message, create app/views/
> > > > > errors/missing_table.ctp
>
> > > > > I am using Cakephp 1.3.
>
> > > > > - My database names are Users, Votes and Users_Votes
> > > > > - My model names are user, vote, and uservote
> > > > > - I think I have my models correct
>
> > > > > class User extends AppModel
> > > > > {
> > > > >     var $name = 'User';
>
> > > > >        var $hasAndBelongsToMany = array(
> > > > >         'UserVote' => array(
> > > > >                 'className' => 'UserVote',
> > > > >                 'foreignKey' => 'user_id',
> > > > >                 'dependent' => true
> > > > >         )
> > > > >     );
> > > > > }
>
> > > > > class UserVote extends AppModel
> > > > > {
> > > > >     var $name = 'UserVote';
>
> > > > >       var $belongsTo = array
> > > > >       (
> > > > >         'Vote' => array
> > > > >               (
> > > > >                'className'  => 'Vote',
> > > > >                

Re: Missing Database Table error

2010-06-11 Thread Andrew
Thank you.
After many different tries I ended up renaming my table to user_votes
and everything seemed to work at last.

It does get confusing!


On Jun 12, 10:01 am, Dima  wrote:
> You can include the following in your model to specify the name of the
> table to use if you do not want to follow Cake's naming convention.
> Try this:
>
> [code]
> var $useTable = ;
> [/code]
>
> So your model will look something like this:
>
> [code]
> class User extends AppModel
> {
>    var $name = 'User';
>    var $useTable = 'user_votes';
>    var $hasAndBelongsToMany = array(
>       'UserVote' => array(
>          'className' => 'UserVote',
>          'foreignKey' => 'user_id',
>          'dependent' => true
>       )
>    );}
>
> [/code]
>
> Hope this helps,
> Dima
>
> On Jun 11, 4:55 pm, Ed Propsner  wrote:
>
>
>
> > All of my underscored table names work just fine, but this is something I
> > wonder about:
>
> > If both parts of the underscored table name are plural (users_votes) ..
> > would the model be UsersVote or UserVote. Do both parts get singularized?
>
> > In any case, your issue still seems to be with naming conventions.
>
> > - Ed
>
> > On Fri, Jun 11, 2010 at 5:43 PM, Jonathon Musters wrote:
>
> > > I think the new table should be called UsersVotes. No underscore.
>
> > > On 6/11/10, Andrew  wrote:
> > > > Hello all,
>
> > > > I've been using cakephp for a few months now and I love it!! I must
> > > > admit I am still getting used to some of the concepts. At the moment
> > > > I'm trying to add a database bridging table for a HasAndBelongsToMany
> > > > Model. My three models involved are Users, Votes and Users_Votes.
>
> > > > So when I call the view /users_votes/create/ I get the error message
>
> > > > Missing Database Table
> > > > Error: Database table user_votes for model UserVote was not found.
> > > > Notice: If you want to customize this error message, create app/views/
> > > > errors/missing_table.ctp
>
> > > > I am using Cakephp 1.3.
>
> > > > - My database names are Users, Votes and Users_Votes
> > > > - My model names are user, vote, and uservote
> > > > - I think I have my models correct
>
> > > > class User extends AppModel
> > > > {
> > > >     var $name = 'User';
>
> > > >        var $hasAndBelongsToMany = array(
> > > >         'UserVote' => array(
> > > >                 'className' => 'UserVote',
> > > >                 'foreignKey' => 'user_id',
> > > >                 'dependent' => true
> > > >         )
> > > >     );
> > > > }
>
> > > > class UserVote extends AppModel
> > > > {
> > > >     var $name = 'UserVote';
>
> > > >       var $belongsTo = array
> > > >       (
> > > >         'Vote' => array
> > > >               (
> > > >                'className'  => 'Vote',
> > > >                'foreignKey' => 'id'
> > > >         )
> > > >     );
> > > > }
>
> > > > class Vote extends AppModel
> > > > {
> > > >     var $name = 'Vote';
>
> > > >       var $hasAndBelongsToMany = array
> > > >       (
> > > >         'UserVote' => array(
> > > >                 'className' => 'UserVote',
> > > >                 'foreignKey' => 'vote_id',
> > > >                               'dependent' => true
> > > >         )
> > > >     );
> > > > }
>
> > > > Thanks!
>
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > 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 > > >  om>For more options, visit this group at
> > > >http://groups.google.com/group/cake-php?hl=en
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 > >  om>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 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: Missing Database Table error

2010-06-11 Thread Dima
You can include the following in your model to specify the name of the
table to use if you do not want to follow Cake's naming convention.
Try this:

[code]
var $useTable = ;
[/code]

So your model will look something like this:

[code]
class User extends AppModel
{
   var $name = 'User';
   var $useTable = 'user_votes';
   var $hasAndBelongsToMany = array(
  'UserVote' => array(
 'className' => 'UserVote',
 'foreignKey' => 'user_id',
 'dependent' => true
  )
   );
}
[/code]

Hope this helps,
Dima

On Jun 11, 4:55 pm, Ed Propsner  wrote:
> All of my underscored table names work just fine, but this is something I
> wonder about:
>
> If both parts of the underscored table name are plural (users_votes) ..
> would the model be UsersVote or UserVote. Do both parts get singularized?
>
> In any case, your issue still seems to be with naming conventions.
>
> - Ed
>
> On Fri, Jun 11, 2010 at 5:43 PM, Jonathon Musters wrote:
>
> > I think the new table should be called UsersVotes. No underscore.
>
> > On 6/11/10, Andrew  wrote:
> > > Hello all,
>
> > > I've been using cakephp for a few months now and I love it!! I must
> > > admit I am still getting used to some of the concepts. At the moment
> > > I'm trying to add a database bridging table for a HasAndBelongsToMany
> > > Model. My three models involved are Users, Votes and Users_Votes.
>
> > > So when I call the view /users_votes/create/ I get the error message
>
> > > Missing Database Table
> > > Error: Database table user_votes for model UserVote was not found.
> > > Notice: If you want to customize this error message, create app/views/
> > > errors/missing_table.ctp
>
> > > I am using Cakephp 1.3.
>
> > > - My database names are Users, Votes and Users_Votes
> > > - My model names are user, vote, and uservote
> > > - I think I have my models correct
>
> > > class User extends AppModel
> > > {
> > >     var $name = 'User';
>
> > >        var $hasAndBelongsToMany = array(
> > >         'UserVote' => array(
> > >                 'className' => 'UserVote',
> > >                 'foreignKey' => 'user_id',
> > >                 'dependent' => true
> > >         )
> > >     );
> > > }
>
> > > class UserVote extends AppModel
> > > {
> > >     var $name = 'UserVote';
>
> > >       var $belongsTo = array
> > >       (
> > >         'Vote' => array
> > >               (
> > >                'className'  => 'Vote',
> > >                'foreignKey' => 'id'
> > >         )
> > >     );
> > > }
>
> > > class Vote extends AppModel
> > > {
> > >     var $name = 'Vote';
>
> > >       var $hasAndBelongsToMany = array
> > >       (
> > >         'UserVote' => array(
> > >                 'className' => 'UserVote',
> > >                 'foreignKey' => 'vote_id',
> > >                               'dependent' => true
> > >         )
> > >     );
> > > }
>
> > > Thanks!
>
> > > 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.comFor
> > >  more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en
>
> > 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.comFor
> >  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 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: Missing Database Table error

2010-06-11 Thread Ed Propsner
All of my underscored table names work just fine, but this is something I
wonder about:

If both parts of the underscored table name are plural (users_votes) ..
would the model be UsersVote or UserVote. Do both parts get singularized?

In any case, your issue still seems to be with naming conventions.

- Ed


On Fri, Jun 11, 2010 at 5:43 PM, Jonathon Musters wrote:

> I think the new table should be called UsersVotes. No underscore.
>
>
>
> On 6/11/10, Andrew  wrote:
> > Hello all,
> >
> > I've been using cakephp for a few months now and I love it!! I must
> > admit I am still getting used to some of the concepts. At the moment
> > I'm trying to add a database bridging table for a HasAndBelongsToMany
> > Model. My three models involved are Users, Votes and Users_Votes.
> >
> > So when I call the view /users_votes/create/ I get the error message
> >
> >
> > Missing Database Table
> > Error: Database table user_votes for model UserVote was not found.
> > Notice: If you want to customize this error message, create app/views/
> > errors/missing_table.ctp
> >
> >
> > I am using Cakephp 1.3.
> >
> > - My database names are Users, Votes and Users_Votes
> > - My model names are user, vote, and uservote
> > - I think I have my models correct
> >
> > class User extends AppModel
> > {
> > var $name = 'User';
> >
> >var $hasAndBelongsToMany = array(
> > 'UserVote' => array(
> > 'className' => 'UserVote',
> > 'foreignKey' => 'user_id',
> > 'dependent' => true
> > )
> > );
> > }
> >
> > class UserVote extends AppModel
> > {
> > var $name = 'UserVote';
> >
> >   var $belongsTo = array
> >   (
> > 'Vote' => array
> >   (
> >'className'  => 'Vote',
> >'foreignKey' => 'id'
> > )
> > );
> > }
> >
> > class Vote extends AppModel
> > {
> > var $name = 'Vote';
> >
> >   var $hasAndBelongsToMany = array
> >   (
> > 'UserVote' => array(
> > 'className' => 'UserVote',
> > 'foreignKey' => 'vote_id',
> >   'dependent' => true
> > )
> > );
> > }
> >
> >
> >
> >
> > Thanks!
> >
> > 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.comFor
> >  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 cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  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 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: Missing Database Table error

2010-06-11 Thread Jonathon Musters
I think the new table should be called UsersVotes. No underscore.



On 6/11/10, Andrew  wrote:
> Hello all,
>
> I've been using cakephp for a few months now and I love it!! I must
> admit I am still getting used to some of the concepts. At the moment
> I'm trying to add a database bridging table for a HasAndBelongsToMany
> Model. My three models involved are Users, Votes and Users_Votes.
>
> So when I call the view /users_votes/create/ I get the error message
>
>
> Missing Database Table
> Error: Database table user_votes for model UserVote was not found.
> Notice: If you want to customize this error message, create app/views/
> errors/missing_table.ctp
>
>
> I am using Cakephp 1.3.
>
> - My database names are Users, Votes and Users_Votes
> - My model names are user, vote, and uservote
> - I think I have my models correct
>
> class User extends AppModel
> {
> var $name = 'User';
>
>var $hasAndBelongsToMany = array(
> 'UserVote' => array(
> 'className' => 'UserVote',
> 'foreignKey' => 'user_id',
> 'dependent' => true
> )
> );
> }
>
> class UserVote extends AppModel
> {
> var $name = 'UserVote';
>
>   var $belongsTo = array
>   (
> 'Vote' => array
>   (
>'className'  => 'Vote',
>'foreignKey' => 'id'
> )
> );
> }
>
> class Vote extends AppModel
> {
> var $name = 'Vote';
>
>   var $hasAndBelongsToMany = array
>   (
> 'UserVote' => array(
> 'className' => 'UserVote',
> 'foreignKey' => 'vote_id',
>   'dependent' => true
> )
> );
> }
>
>
>
>
> Thanks!
>
> 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
>

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


Missing Database Table error

2010-06-11 Thread Andrew
Hello all,

I've been using cakephp for a few months now and I love it!! I must
admit I am still getting used to some of the concepts. At the moment
I'm trying to add a database bridging table for a HasAndBelongsToMany
Model. My three models involved are Users, Votes and Users_Votes.

So when I call the view /users_votes/create/ I get the error message


Missing Database Table
Error: Database table user_votes for model UserVote was not found.
Notice: If you want to customize this error message, create app/views/
errors/missing_table.ctp


I am using Cakephp 1.3.

- My database names are Users, Votes and Users_Votes
- My model names are user, vote, and uservote
- I think I have my models correct

class User extends AppModel
{
var $name = 'User';

 var $hasAndBelongsToMany = array(
'UserVote' => array(
'className' => 'UserVote',
'foreignKey' => 'user_id',
'dependent' => true
)
);
}

class UserVote extends AppModel
{
var $name = 'UserVote';

var $belongsTo = array
(
'Vote' => array
(
   'className'  => 'Vote',
   'foreignKey' => 'id'
)
);
}

class Vote extends AppModel
{
var $name = 'Vote';

var $hasAndBelongsToMany = array
(
'UserVote' => array(
'className' => 'UserVote',
'foreignKey' => 'vote_id',
'dependent' => true
)
);
}




Thanks!

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: Missing Database Table

2009-11-16 Thread David Roda
Also:

when you navigate to the homepage: http://localhost/Cake_Application/ does
everything appear ok? (with styles, etc.)  Does it say it is able to connect
to the database?

Do all of the values appear correctly in
Cake_Application/config/database.php ?

On Mon, Nov 16, 2009 at 8:18 AM, jburns  wrote:

> Just a quick knee jerk reply. What happens if you access this link:
> http://localhost/Cake_Application/posts (in other words with
> index.php)?
>
> On Nov 16, 7:04 am, SugarCRM Geek  wrote:
> > hi all,
> > Am new to Cake. i started by trying to create an application using
> > Command Line Interface.
> > My datasource configuration looks like this:
> > Name: default
> > Driver:   mysql
> > Persistent:   false
> > Host: 127.0.0.1
> > Port: 3306
> > User: root
> > Pass:
> > Database: cake_db
> >  inside the Database "cake_db", i have 2 tables 'posts' & 'items'.
> > Based on these two tables,am being prompted to create the Model &
> > Controller.
> >  After giving all the right inputs, i get this message:
> > ---
> > The following Model will be created:
> > ---
> > Name:   Post
> > Associations:
> > ---
> > Look okay? (y/n)
> > [y] > y.
> >
> >  same goes for the Contoller too.
> >
> > ---
> > The following controller will be created:
> > ---
> > Controller Name:  Posts
> >var $scaffold;
> > ---
> >
> > same for the Views also.
> >
> > but the problem is when i go to the
> URLhttp://localhost/Cake_Application/index.php/posts
> >
> > i get the following error message:
> > Missing Database Table
> > Error: Database table posts for model Post was not found.
> >
> > When i take a " print_r($config);" from dbo_mysql.php, i get this
> >
> > Array ( [persistent] => [host] => localhost [login] => root [password]
> > => [database] => posts [port] => 3306 [connect] => mysql_pconnect
> > [driver] => mysql [prefix] => )
> >
> > where u can clearly see that the database it is showing is 'posts' ?
> >
> > why is it not taking the database name given by me i.e. 'cake_db' ?
> >
> > been in this problem thru the weekend, hope somebody gives me
> > solution for this.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-...@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=.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@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=.




Re: Missing Database Table

2009-11-16 Thread jburns
Just a quick knee jerk reply. What happens if you access this link:
http://localhost/Cake_Application/posts (in other words with
index.php)?

On Nov 16, 7:04 am, SugarCRM Geek  wrote:
> hi all,
>     Am new to Cake. i started by trying to create an application using
> Command Line Interface.
> My datasource configuration looks like this:
> Name:         default
> Driver:       mysql
> Persistent:   false
> Host:         127.0.0.1
> Port:         3306
> User:         root
> Pass:
> Database:     cake_db
>      inside the Database "cake_db", i have 2 tables 'posts' & 'items'.
> Based on these two tables,am being prompted to create the Model &
> Controller.
>      After giving all the right inputs, i get this message:
> ---
> The following Model will be created:
> ---
> Name:       Post
> Associations:
> ---
> Look okay? (y/n)
> [y] > y.
>
>  same goes for the Contoller too.
>
> ---
> The following controller will be created:
> ---
> Controller Name:  Posts
>                    var $scaffold;
> ---
>
> same for the Views also.
>
> but the problem is when i go to the 
> URLhttp://localhost/Cake_Application/index.php/posts
>
> i get the following error message:
> Missing Database Table
> Error: Database table posts for model Post was not found.
>
> When i take a " print_r($config);" from dbo_mysql.php, i get this
>
> Array ( [persistent] => [host] => localhost [login] => root [password]
> => [database] => posts [port] => 3306 [connect] => mysql_pconnect
> [driver] => mysql [prefix] => )
>
> where u can clearly see that the database it is showing is 'posts' ?
>
> why is it not taking the database name given by me i.e. 'cake_db' ?
>
>     been in this problem thru the weekend, hope somebody gives me
> solution for this.

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@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=.




Missing Database Table

2009-11-16 Thread SugarCRM Geek
hi all,
Am new to Cake. i started by trying to create an application using
Command Line Interface.
My datasource configuration looks like this:
Name: default
Driver:   mysql
Persistent:   false
Host: 127.0.0.1
Port: 3306
User: root
Pass:
Database: cake_db
 inside the Database "cake_db", i have 2 tables 'posts' & 'items'.
Based on these two tables,am being prompted to create the Model &
Controller.
 After giving all the right inputs, i get this message:
---
The following Model will be created:
---
Name:   Post
Associations:
---
Look okay? (y/n)
[y] > y.

 same goes for the Contoller too.

---
The following controller will be created:
---
Controller Name:  Posts
   var $scaffold;
---

same for the Views also.

but the problem is when i go to the URL
http://localhost/Cake_Application/index.php/posts

i get the following error message:
Missing Database Table
Error: Database table posts for model Post was not found.

When i take a " print_r($config);" from dbo_mysql.php, i get this

Array ( [persistent] => [host] => localhost [login] => root [password]
=> [database] => posts [port] => 3306 [connect] => mysql_pconnect
[driver] => mysql [prefix] => )

where u can clearly see that the database it is showing is 'posts' ?

why is it not taking the database name given by me i.e. 'cake_db' ?

been in this problem thru the weekend, hope somebody gives me
solution for this.

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@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=.




Re: Missing Database Table

2009-09-09 Thread new2cakephp

you are awesome..!!!
i jus screwed up the name of the database.!!
thanks a ton..!!!
thanks

On Sep 9, 10:14 pm, Miles J  wrote:
> Go to localhost/phpmyadmin in your browsers address bar. From there
> you should see all your database tables created on your localhost. Now
> open database.php within your Cake app and determine if the database
> names and users match up. Seems like you might be creating the posts
> table on the wrong db, or not at all.
>
> On Sep 9, 6:01 pm, new2cakephp  wrote:
>
> > Please eloborate..!!!
> > thanks
>
> > On Sep 9, 8:33 pm, Miles J  wrote:
>
> > > Since your on xampp, does your database information in your config
> > > file match the database found at localhost/phpmyadmin (or your online
> > > server)?
>
> > > On Sep 9, 3:47 pm, new2cakephp  wrote:
>
> > > > tried that too..!!
> > > > I guess there is connection to the database..
> > > > but when i check xampp/mysql/data/
> > > > I have the database that I have created..
>
> > > > On Sep 9, 6:38 pm, Miles J  wrote:
>
> > > > > Try putting var $useTable = 'posts'; in your Post model and see what
> > > > > happens.
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-09 Thread Miles J

Go to localhost/phpmyadmin in your browsers address bar. From there
you should see all your database tables created on your localhost. Now
open database.php within your Cake app and determine if the database
names and users match up. Seems like you might be creating the posts
table on the wrong db, or not at all.

On Sep 9, 6:01 pm, new2cakephp  wrote:
> Please eloborate..!!!
> thanks
>
> On Sep 9, 8:33 pm, Miles J  wrote:
>
> > Since your on xampp, does your database information in your config
> > file match the database found at localhost/phpmyadmin (or your online
> > server)?
>
> > On Sep 9, 3:47 pm, new2cakephp  wrote:
>
> > > tried that too..!!
> > > I guess there is connection to the database..
> > > but when i check xampp/mysql/data/
> > > I have the database that I have created..
>
> > > On Sep 9, 6:38 pm, Miles J  wrote:
>
> > > > Try putting var $useTable = 'posts'; in your Post model and see what
> > > > happens.
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-09 Thread new2cakephp

Please eloborate..!!!
thanks

On Sep 9, 8:33 pm, Miles J  wrote:
> Since your on xampp, does your database information in your config
> file match the database found at localhost/phpmyadmin (or your online
> server)?
>
> On Sep 9, 3:47 pm, new2cakephp  wrote:
>
> > tried that too..!!
> > I guess there is connection to the database..
> > but when i check xampp/mysql/data/
> > I have the database that I have created..
>
> > On Sep 9, 6:38 pm, Miles J  wrote:
>
> > > Try putting var $useTable = 'posts'; in your Post model and see what
> > > happens.
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-09 Thread Miles J

Since your on xampp, does your database information in your config
file match the database found at localhost/phpmyadmin (or your online
server)?

On Sep 9, 3:47 pm, new2cakephp  wrote:
> tried that too..!!
> I guess there is connection to the database..
> but when i check xampp/mysql/data/
> I have the database that I have created..
>
> On Sep 9, 6:38 pm, Miles J  wrote:
>
> > Try putting var $useTable = 'posts'; in your Post model and see what
> > happens.
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-09 Thread new2cakephp

tried that too..!!
I guess there is connection to the database..
but when i check xampp/mysql/data/
I have the database that I have created..


On Sep 9, 6:38 pm, Miles J  wrote:
> Try putting var $useTable = 'posts'; in your Post model and see what
> happens.
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-09 Thread Miles J

Try putting var $useTable = 'posts'; in your Post model and see what
happens.
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-09 Thread new2cakephp

tried that too..!!!
it shows the same error



On Sep 8, 1:49 pm, Miles J  wrote:
> Do you have caching on? Try clearing your tmp/cache folders.
>
> Also try doing var $uses = array('Post'); in your controller.
>
> On Sep 8, 9:33 am, new2cakephp  wrote:
>
> > yup that is how it is..!!!
>
> > On Sep 8, 12:11 pm, Miles J  wrote:
>
> > > Make sure your filename is post.php and the model class name is Post.
> > > The filename is the biggest problem people have.
>
> > > On Sep 8, 6:26 am, new2cakephp  wrote:
>
> > > > when I dohttp://localhost/cakephpinthebrowser
> > > > i get cakephp home page everything is green, n it says
>
> > > > Cake is able to connect to the database.
>
> > > > is this how u check the connection..???
>
> > > > On Sep 8, 4:02 am, "Dr. Loboto"  wrote:
>
> > > > > Okay, I'll be more concrete - do Cake have access to database? Missing
> > > > > database table error page can be displayed in two cases - when there
> > > > > is no table and when there is no connection to database at all.
>
> > > > > On Sep 8, 2:33 pm, new2cakephp  wrote:
>
> > > > > > yes, Dr I do have a connection to the database.
> > > > > > I am doing the whole thing in XAMPP, executed the queries in
> > > > > > phpmyadmin
>
> > > > > > On Sep 8, 2:29 am, "Dr. Loboto"  wrote:
>
> > > > > > > Do you have connection to your database? Do you have table named
> > > > > > > "posts" in that database?
>
> > > > > > > On Sep 8, 11:09 am, new2cakephp  wrote:
>
> > > > > > > > Hi all,
>
> > > > > > > > I am new to cakephp, started working on the blog tutorials,
>
> > > > > > > > Missing Database Table
> > > > > > > > Error: Database table posts for model Post was not found.
>
> > > > > > > > have got this error, checked the naming conventions but still no
> > > > > > > > solution
> > > > > > > > help me on this
>
> > > > > > > > thanks all
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-08 Thread Miles J

Do you have caching on? Try clearing your tmp/cache folders.

Also try doing var $uses = array('Post'); in your controller.

On Sep 8, 9:33 am, new2cakephp  wrote:
> yup that is how it is..!!!
>
> On Sep 8, 12:11 pm, Miles J  wrote:
>
> > Make sure your filename is post.php and the model class name is Post.
> > The filename is the biggest problem people have.
>
> > On Sep 8, 6:26 am, new2cakephp  wrote:
>
> > > when I dohttp://localhost/cakephpinthebrowser
> > > i get cakephp home page everything is green, n it says
>
> > > Cake is able to connect to the database.
>
> > > is this how u check the connection..???
>
> > > On Sep 8, 4:02 am, "Dr. Loboto"  wrote:
>
> > > > Okay, I'll be more concrete - do Cake have access to database? Missing
> > > > database table error page can be displayed in two cases - when there
> > > > is no table and when there is no connection to database at all.
>
> > > > On Sep 8, 2:33 pm, new2cakephp  wrote:
>
> > > > > yes, Dr I do have a connection to the database.
> > > > > I am doing the whole thing in XAMPP, executed the queries in
> > > > > phpmyadmin
>
> > > > > On Sep 8, 2:29 am, "Dr. Loboto"  wrote:
>
> > > > > > Do you have connection to your database? Do you have table named
> > > > > > "posts" in that database?
>
> > > > > > On Sep 8, 11:09 am, new2cakephp  wrote:
>
> > > > > > > Hi all,
>
> > > > > > > I am new to cakephp, started working on the blog tutorials,
>
> > > > > > > Missing Database Table
> > > > > > > Error: Database table posts for model Post was not found.
>
> > > > > > > have got this error, checked the naming conventions but still no
> > > > > > > solution
> > > > > > > help me on this
>
> > > > > > > thanks all
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-08 Thread new2cakephp

yup that is how it is..!!!


On Sep 8, 12:11 pm, Miles J  wrote:
> Make sure your filename is post.php and the model class name is Post.
> The filename is the biggest problem people have.
>
> On Sep 8, 6:26 am, new2cakephp  wrote:
>
> > when I dohttp://localhost/cakephpinthe browser
> > i get cakephp home page everything is green, n it says
>
> > Cake is able to connect to the database.
>
> > is this how u check the connection..???
>
> > On Sep 8, 4:02 am, "Dr. Loboto"  wrote:
>
> > > Okay, I'll be more concrete - do Cake have access to database? Missing
> > > database table error page can be displayed in two cases - when there
> > > is no table and when there is no connection to database at all.
>
> > > On Sep 8, 2:33 pm, new2cakephp  wrote:
>
> > > > yes, Dr I do have a connection to the database.
> > > > I am doing the whole thing in XAMPP, executed the queries in
> > > > phpmyadmin
>
> > > > On Sep 8, 2:29 am, "Dr. Loboto"  wrote:
>
> > > > > Do you have connection to your database? Do you have table named
> > > > > "posts" in that database?
>
> > > > > On Sep 8, 11:09 am, new2cakephp  wrote:
>
> > > > > > Hi all,
>
> > > > > > I am new to cakephp, started working on the blog tutorials,
>
> > > > > > Missing Database Table
> > > > > > Error: Database table posts for model Post was not found.
>
> > > > > > have got this error, checked the naming conventions but still no
> > > > > > solution
> > > > > > help me on this
>
> > > > > > thanks all
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-08 Thread new2cakephp

this piece of code is in the post.php





this piece of code in the posts_controller.php


set('posts', $this->Post->find('all'));
}
function view($id = null) {
$this->Post->id = $id;
$this->set('post', $this->Post->read());
   }
   }
   ?>

I have done nothing complicated..!!! jus followed the blog tutorials





On Sep 8, 12:12 pm, brian  wrote:
> Can you post the controller action that throws this error?
>
> On Tue, Sep 8, 2009 at 12:09 AM, new2cakephp wrote:
>
> > Hi all,
>
> > I am new to cakephp, started working on the blog tutorials,
>
> > Missing Database Table
> > Error: Database table posts for model Post was not found.
>
> > have got this error, checked the naming conventions but still no
> > solution
> > help me on this
>
> > thanks all
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-08 Thread brian

Can you post the controller action that throws this error?

On Tue, Sep 8, 2009 at 12:09 AM, new2cakephp wrote:
>
> Hi all,
>
> I am new to cakephp, started working on the blog tutorials,
>
> Missing Database Table
> Error: Database table posts for model Post was not found.
>
> have got this error, checked the naming conventions but still no
> solution
> help me on this
>
> thanks all
>
> >
>

--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-08 Thread Miles J

Make sure your filename is post.php and the model class name is Post.
The filename is the biggest problem people have.

On Sep 8, 6:26 am, new2cakephp  wrote:
> when I dohttp://localhost/cakephpin the browser
> i get cakephp home page everything is green, n it says
>
> Cake is able to connect to the database.
>
> is this how u check the connection..???
>
> On Sep 8, 4:02 am, "Dr. Loboto"  wrote:
>
> > Okay, I'll be more concrete - do Cake have access to database? Missing
> > database table error page can be displayed in two cases - when there
> > is no table and when there is no connection to database at all.
>
> > On Sep 8, 2:33 pm, new2cakephp  wrote:
>
> > > yes, Dr I do have a connection to the database.
> > > I am doing the whole thing in XAMPP, executed the queries in
> > > phpmyadmin
>
> > > On Sep 8, 2:29 am, "Dr. Loboto"  wrote:
>
> > > > Do you have connection to your database? Do you have table named
> > > > "posts" in that database?
>
> > > > On Sep 8, 11:09 am, new2cakephp  wrote:
>
> > > > > Hi all,
>
> > > > > I am new to cakephp, started working on the blog tutorials,
>
> > > > > Missing Database Table
> > > > > Error: Database table posts for model Post was not found.
>
> > > > > have got this error, checked the naming conventions but still no
> > > > > solution
> > > > > help me on this
>
> > > > > thanks all
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-08 Thread new2cakephp

when I do http://localhost/cakephp in the browser
i get cakephp home page everything is green, n it says

Cake is able to connect to the database.

is this how u check the connection..???


On Sep 8, 4:02 am, "Dr. Loboto"  wrote:
> Okay, I'll be more concrete - do Cake have access to database? Missing
> database table error page can be displayed in two cases - when there
> is no table and when there is no connection to database at all.
>
> On Sep 8, 2:33 pm, new2cakephp  wrote:
>
> > yes, Dr I do have a connection to the database.
> > I am doing the whole thing in XAMPP, executed the queries in
> > phpmyadmin
>
> > On Sep 8, 2:29 am, "Dr. Loboto"  wrote:
>
> > > Do you have connection to your database? Do you have table named
> > > "posts" in that database?
>
> > > On Sep 8, 11:09 am, new2cakephp  wrote:
>
> > > > Hi all,
>
> > > > I am new to cakephp, started working on the blog tutorials,
>
> > > > Missing Database Table
> > > > Error: Database table posts for model Post was not found.
>
> > > > have got this error, checked the naming conventions but still no
> > > > solution
> > > > help me on this
>
> > > > thanks all
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-08 Thread Dr. Loboto

Okay, I'll be more concrete - do Cake have access to database? Missing
database table error page can be displayed in two cases - when there
is no table and when there is no connection to database at all.

On Sep 8, 2:33 pm, new2cakephp  wrote:
> yes, Dr I do have a connection to the database.
> I am doing the whole thing in XAMPP, executed the queries in
> phpmyadmin
>
> On Sep 8, 2:29 am, "Dr. Loboto"  wrote:
>
>
>
> > Do you have connection to your database? Do you have table named
> > "posts" in that database?
>
> > On Sep 8, 11:09 am, new2cakephp  wrote:
>
> > > Hi all,
>
> > > I am new to cakephp, started working on the blog tutorials,
>
> > > Missing Database Table
> > > Error: Database table posts for model Post was not found.
>
> > > have got this error, checked the naming conventions but still no
> > > solution
> > > help me on this
>
> > > thanks all
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-08 Thread new2cakephp

yes, Dr I do have a connection to the database.
I am doing the whole thing in XAMPP, executed the queries in
phpmyadmin






On Sep 8, 2:29 am, "Dr. Loboto"  wrote:
> Do you have connection to your database? Do you have table named
> "posts" in that database?
>
> On Sep 8, 11:09 am, new2cakephp  wrote:
>
> > Hi all,
>
> > I am new to cakephp, started working on the blog tutorials,
>
> > Missing Database Table
> > Error: Database table posts for model Post was not found.
>
> > have got this error, checked the naming conventions but still no
> > solution
> > help me on this
>
> > thanks all
--~--~-~--~~~---~--~~
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: Missing Database Table

2009-09-07 Thread Dr. Loboto

Do you have connection to your database? Do you have table named
"posts" in that database?

On Sep 8, 11:09 am, new2cakephp  wrote:
> Hi all,
>
> I am new to cakephp, started working on the blog tutorials,
>
> Missing Database Table
> Error: Database table posts for model Post was not found.
>
> have got this error, checked the naming conventions but still no
> solution
> help me on this
>
> thanks all
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Missing Database Table

2009-09-07 Thread new2cakephp

Hi everyone,

I am new to cakephp, was trying to build a blog using the tutorials,
did everything as it was said but i am getting this error.

Missing Database Table

Error: Database table posts for model Post was not found.

Read the naming conventions, could not find the solution for
this...!!!

thanks in advance

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



Missing Database Table

2009-09-07 Thread new2cakephp

Hi all,

I am new to cakephp, started working on the blog tutorials,

Missing Database Table
Error: Database table posts for model Post was not found.

have got this error, checked the naming conventions but still no
solution
help me on this

thanks all

--~--~-~--~~~---~--~~
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: CakePHP 1.2 Missing Database Table

2009-09-05 Thread mikeottinger

Oh boy, what a difference a night of sleep makes. I went to grab the
model for my missing database table and the problem jumped right at
me:

var $useDbConfig = 'local';

was found at the top of the work.php model, I switched it to 'default'
and voila, it worked. So *this* is another solution for the Missing
Database Table problem as well.

Thanks a lot guys, I hope this is helpful to a fellow newbie such as
myself.

On Sep 5, 4:34 am, Teh Treag  wrote:
> Are your database connection settings different on your production and
> development servers?  Do you have other models that work?
>
> On Sep 5, 1:55 am, mikeottinger  wrote:
>
> > Hi All,
>
> >   I just deployed the beginnings of a new site onto a little
> > development space up on my host server. Everything works great in my
> > local environment. But upon deploy, I see this:
>
> > Missing Database Table
> > Error:  Database table works for model Work was not found.
>
> > I've searched google, and almost every hit mentions clearing files out
> > of tmp/cache/models and tmp/cache/persistent. I've done this, but it
> > still gives me this error. The table it's complaining about is
> > definitely there, I went to the MySQL admin section and saw it there.
>
> > Any ideas on this?
>
> > Oh, I'm running PHP5 as well.
>
> > Thanks in advance.
--~--~-~--~~~---~--~~
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: CakePHP 1.2 Missing Database Table

2009-09-05 Thread Teh Treag

Are your database connection settings different on your production and
development servers?  Do you have other models that work?

On Sep 5, 1:55 am, mikeottinger  wrote:
> Hi All,
>
>   I just deployed the beginnings of a new site onto a little
> development space up on my host server. Everything works great in my
> local environment. But upon deploy, I see this:
>
> Missing Database Table
> Error:  Database table works for model Work was not found.
>
> I've searched google, and almost every hit mentions clearing files out
> of tmp/cache/models and tmp/cache/persistent. I've done this, but it
> still gives me this error. The table it's complaining about is
> definitely there, I went to the MySQL admin section and saw it there.
>
> Any ideas on this?
>
> Oh, I'm running PHP5 as well.
>
> Thanks in advance.
--~--~-~--~~~---~--~~
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: CakePHP 1.2 Missing Database Table

2009-09-05 Thread learning_cake_php

please post your model and database structure for us to envistigate; )

On Sep 4, 11:55 pm, mikeottinger  wrote:
> Hi All,
>
>   I just deployed the beginnings of a new site onto a little
> development space up on my host server. Everything works great in my
> local environment. But upon deploy, I see this:
>
> Missing Database Table
> Error:  Database table works for model Work was not found.
>
> I've searched google, and almost every hit mentions clearing files out
> of tmp/cache/models and tmp/cache/persistent. I've done this, but it
> still gives me this error. The table it's complaining about is
> definitely there, I went to the MySQL admin section and saw it there.
>
> Any ideas on this?
>
> Oh, I'm running PHP5 as well.
>
> Thanks in advance.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



CakePHP 1.2 Missing Database Table

2009-09-04 Thread mikeottinger

Hi All,

  I just deployed the beginnings of a new site onto a little
development space up on my host server. Everything works great in my
local environment. But upon deploy, I see this:

Missing Database Table
Error:  Database table works for model Work was not found.

I've searched google, and almost every hit mentions clearing files out
of tmp/cache/models and tmp/cache/persistent. I've done this, but it
still gives me this error. The table it's complaining about is
definitely there, I went to the MySQL admin section and saw it there.

Any ideas on this?

Oh, I'm running PHP5 as well.

Thanks in advance.
--~--~-~--~~~---~--~~
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: Missing Database Table Error

2009-08-17 Thread brian

You have a HABTM assoc. between those two models so you need to have a
join table named artists_comics. Create that with 2 columns, artist_id
& comic_id (note the singular). The type for the columns should match
whatever you're using for artists.id & comics.id (though not
auto_increment/serial, of course).

On Mon, Aug 17, 2009 at 6:39 PM, fightinggeek wrote:
>
>
> I get this error when I try to load the scaffold view.
> I have tables called artists and comics in the comic database and models
> call artist.php and comic.php. i have no idea what I'm doing wrong.
>
> Missing Database Table
>
> Error: Database table artists_comics for model ArtistsComic was not found.
> --
> View this message in context: 
> http://www.nabble.com/Missing-Database-Table--Error-tp25015550p25015550.html
> Sent from the CakePHP mailing list archive at Nabble.com.
>
>
> >
>

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



Missing Database Table Error

2009-08-17 Thread fightinggeek


I get this error when I try to load the scaffold view.
I have tables called artists and comics in the comic database and models
call artist.php and comic.php. i have no idea what I'm doing wrong. 

Missing Database Table

Error: Database table artists_comics for model ArtistsComic was not found.
-- 
View this message in context: 
http://www.nabble.com/Missing-Database-Table--Error-tp25015550p25015550.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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: Missing Database table error: possibly related to model caching

2009-05-28 Thread Miles J

Is the missing table an actual table in the database? Sometimes it
throws errors when your model associations are wrong.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Missing Database table error: possibly related to model caching

2009-05-28 Thread Robert

Hi All,

I am having a problem with one of our websites, all of the pages are
broken, each one saying that a database table is missing. This is
actually a project i have in Subversion, and is the 13th checkout of
identical code. All 13 sites use the same database file structure.
Upon trying to launch the last new domain is when i started to receive
these errors for all the pages. This exact same code is still working
for the other 12 sites...I have done extensive research into the
subject today, and everywhere i find people with similar problems, i
get the same answer...its has to do with the model cache. From what
i've read clearing the model cache should do the trick, but i am still
getting the same errors. Some things i have tried:

-clearing all cache files from "/app/tmp/cache/models/" & "/app/tmp/
cache/persistent/"
-reset cache by setting debug mode to 2.
-Even tried disabling cache for the site completely in core.php...
"Configure::write('Cache.disable', true);"

Does anyone have any insight as to what else i could try to get my
tables working again?

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



Missing Database Table in Test-Groups - but not in single Test-Case

2009-03-16 Thread den

Hi

I have wrote some Test-Cases which run correctly if i run every Case
by hand. But If i run it from a Test-Group i got "Missing Database
Table" at different positions. I try this to reproduce the error:

- Got the latest Brunch from SVN
- Configured Database, Temp-Dir, ...
- Baked a Model, a Controller and Views for one table (the only table
in the db)
- Test the two baked Test-Cases - they run correctly
- Then i created this Test-Group:

class AllAllGroupTest extends GroupTest {
public $label = 'Tests all';
protected $directory = array( 'models', 'controllers',);

public function __construct() {
foreach($this->directory as $directory){
TestManager::addTestCasesFromDirectory($this, 
APP_TEST_CASES.DS.
$directory);
}
    }
}

If i run this Test-Group, i got a "Missing Database Table" error. But
if i switch the two directory's to array('controllers', 'models', ),
the both Test-Cases runs whit out any error.

For me it looks like the database connection is not correctly set back
to 'default' before the models do a 'describe ...' to the database and
the fixtures are not loaded at this time.

It doesn't only happens in this, a lite bit searched, case. I saw this
the first time when i created the first component test. And in my eyes
the order of the Cases should not do any difference to a Test.

Is this a bug or how can i avoid that?

Thanks for any Help

Den

--~--~-~--~~~---~--~~
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: Missing Database Table

2008-09-16 Thread Bernhard J. M. Grün
Hi!

This seems to be an ACL table. I think there was a call like "cake acl
something" to generate that tables.

HTH

Bernhard


2008/9/16 [EMAIL PROTECTED] <[EMAIL PROTECTED]>

>
> Whenever I am oh so sure I have everything setup but I still get
> strange errors like this it is always one thing... cache.
> Empty out all the caches and refresh. Hopefully your table will be
> available again.
>
>
>
> On Sep 16, 8:35 am, simpleman996633 <[EMAIL PROTECTED]>
> wrote:
> > Hi all,
> >
> > After running my Cake application locally i tried to upload it to my
> > remote server, configured everything properly, checked all the tables,
> > database access. But i couldn't solve the following error. I can't
> > find enough resources too . Plz somebody help
> >
> > Missing Database Table
> > Error: Database table acos for model Aco was not found.
> >
> > Notice: If you want to customize this error message, create app/views/
> > errors/missing_table.ctp
> >
> > I used the ACL component.
> >
> > Plz help
> >
>

--~--~-~--~~~---~--~~
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: Missing Database Table

2008-09-16 Thread [EMAIL PROTECTED]

Whenever I am oh so sure I have everything setup but I still get
strange errors like this it is always one thing... cache.
Empty out all the caches and refresh. Hopefully your table will be
available again.



On Sep 16, 8:35 am, simpleman996633 <[EMAIL PROTECTED]>
wrote:
> Hi all,
>
> After running my Cake application locally i tried to upload it to my
> remote server, configured everything properly, checked all the tables,
> database access. But i couldn't solve the following error. I can't
> find enough resources too . Plz somebody help
>
> Missing Database Table
> Error: Database table acos for model Aco was not found.
>
> Notice: If you want to customize this error message, create app/views/
> errors/missing_table.ctp
>
> I used the ACL component.
>
> Plz help
--~--~-~--~~~---~--~~
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: Missing Database Table

2008-09-10 Thread Luiz Poleto
"In the app/config/core.php do you have the debug set to 0 or 1 if it is set
to zero set it to 1,2, or 3 as this will keep refreshing your cache.
>From what I have learned in the short time I been learning Cake the cache
doesn't refresh as much will in production mode (debug set to 0) to help
speed up the app."

Actually i haven't paid attention to what my debug level was. I will check
that.
Anyway, a change in the database in production is not likely to happen all
the time.

Regards,
Luiz Poleto


2008/9/10 teknoid <[EMAIL PROTECTED]>

>
> Why is that a problem? It works exactly as it should...
> If you do not wish to cache your models, you can disable it in
> core.php (you shouldn't disable cache in production).
>
> On Sep 10, 2:20 pm, "Luiz Poleto" <[EMAIL PROTECTED]> wrote:
> > I've been having a few problems with Cake 1.2.0.7296 RC2 internal cache.
> If
> > i change something in the database, those changes are not reflected in
> Cake,
> > what causes a lot of error.Actually nothing to worry too much, since
> > deleting the cache files is solving it. But i'm concerned about how far
> this
> > problem goes.
> >
> > By the way, does anyone here having problem with that?
> >
> > Best regards,
> > Luiz Poleto
> >
> > 2008/9/10 forrestgump <[EMAIL PROTECTED]>
> >
> >
> >
> > > Luiz Poleto
> >
> > >  Yea i checked my tables and all they were all perfect i tried the
> > > delete the cache solution by bonitarunner, tht did the trickman
> > > cake is wierd
> >
> > > Thanks a lot guys.saved me a lot of time.
> >
> > > On Sep 10, 8:07 pm, "Luiz Poleto" <[EMAIL PROTECTED]> wrote:
> > > > Gump,
> > > > Is this message correct?
> >
> > > > "Error:  Database table itemss for model Items was not found."
> >
> > > > Look at table name the message show: itemss. If that is the message
> Cake
> > > has
> > > > shown, then something is not properly configured, like the model
> class,
> > > for
> > > > example.
> >
> > > > Regards,
> > > > Luiz Poleto
> >
> > > > 2008/9/10 bonitarunner <[EMAIL PROTECTED]>
> >
> > > > > Gump...Exact same thing happened to me!  Very frustrating.  I am
> > > > > absolute beginner (following same todo example) but here is what I
> did
> > > > > to get it to work.
> >
> > > > > 1)  Made another database called apress (not cake), then made items
> > > > > table in phpAdmin, put same fields as in example.  Finally, changed
> > > > > database.php settings to match to apress database.
> > > > > 2)  turned off caching app\config\core.phpthis line   > > > > this>Configure::write('Cache.disable', true);   you
> > > > > need to do this but I did anyway>
> > > > > 3)  stopped wamp and restarted
> > > > > 4)  refreshed todo/items in browser and works perfectly now.  No
> code
> > > > > changes.
> >
> > > > > I also downloaded authors code from book site (exactly the same as
> > > > > mine earlier with your same error).  He uses PHP shorthand so make
> > > > > sure your  and  have  of
> > > > >  >
> > > > > Rough startbut it works now.  I hope it helps you.
> >
> > > > > On Sep 9, 3:39 am, forrestgump <[EMAIL PROTECTED]> wrote:
> > > > > > Hey guys,
> > > > > >  I'm new to cakephp and can't wait to get it fired up.i was
> > > > > > creating a test app...and i followed the following steps:
> >
> > > > > > 1) created a database cake
> > > > > > 2) placed my cake folder into my www folder and renamed it to
> "todo"
> > > > > > 3) created a table "items" in database "cake"
> > > > > > 4) configured my database.php respectively.
> > > > > > 5) created an items_controller.php in \www\todo\app\controllers
> with
> > > > > > the following code:
> > > > > >  > > > > > class ItemsController extends AppController
> > > > > > {
> > > > > > var $name = 'Items';
> > > > > > var $scaffold;
> > > > > > }
> > > > 

Re: Missing Database Table

2008-09-10 Thread Luiz Poleto
I've been having a few problems with Cake 1.2.0.7296 RC2 internal cache. If
i change something in the database, those changes are not reflected in Cake,
what causes a lot of error.Actually nothing to worry too much, since
deleting the cache files is solving it. But i'm concerned about how far this
problem goes.

By the way, does anyone here having problem with that?

Best regards,
Luiz Poleto

2008/9/10 forrestgump <[EMAIL PROTECTED]>

>
> Luiz Poleto
>
>  Yea i checked my tables and all they were all perfect i tried the
> delete the cache solution by bonitarunner, tht did the trickman
> cake is wierd
>
> Thanks a lot guys.saved me a lot of time.
>
>
>
> On Sep 10, 8:07 pm, "Luiz Poleto" <[EMAIL PROTECTED]> wrote:
> > Gump,
> > Is this message correct?
> >
> > "Error:  Database table itemss for model Items was not found."
> >
> > Look at table name the message show: itemss. If that is the message Cake
> has
> > shown, then something is not properly configured, like the model class,
> for
> > example.
> >
> > Regards,
> > Luiz Poleto
> >
> > 2008/9/10 bonitarunner <[EMAIL PROTECTED]>
> >
> >
> >
> > > Gump...Exact same thing happened to me!  Very frustrating.  I am
> > > absolute beginner (following same todo example) but here is what I did
> > > to get it to work.
> >
> > > 1)  Made another database called apress (not cake), then made items
> > > table in phpAdmin, put same fields as in example.  Finally, changed
> > > database.php settings to match to apress database.
> > > 2)  turned off caching app\config\core.phpthis line   > > this>Configure::write('Cache.disable', true);   > > need to do this but I did anyway>
> > > 3)  stopped wamp and restarted
> > > 4)  refreshed todo/items in browser and works perfectly now.  No code
> > > changes.
> >
> > > I also downloaded authors code from book site (exactly the same as
> > > mine earlier with your same error).  He uses PHP shorthand so make
> > > sure your  and  have  > >  >
> > > Rough startbut it works now.  I hope it helps you.
> >
> > > On Sep 9, 3:39 am, forrestgump <[EMAIL PROTECTED]> wrote:
> > > > Hey guys,
> > > >  I'm new to cakephp and can't wait to get it fired up.i was
> > > > creating a test app...and i followed the following steps:
> >
> > > > 1) created a database cake
> > > > 2) placed my cake folder into my www folder and renamed it to "todo"
> > > > 3) created a table "items" in database "cake"
> > > > 4) configured my database.php respectively.
> > > > 5) created an items_controller.php in \www\todo\app\controllers with
> > > > the following code:
> > > >  > > > class ItemsController extends AppController
> > > > {
> > > > var $name = 'Items';
> > > > var $scaffold;
> > > > }
> > > > ?>
> > > > 6) create an item.php in C:\wamp\www\todo\app\models with the
> > > > following code:
> > > >  > > > class Item extends AppModel
> > > > {
> > > > var $name = 'Item';
> > > > }
> > > > ?>
> > > > 7) i visitedhttp://localhost/todo/itemstosee a nice message in red
> > > > saying:
> > > >  "Missing Database Table"
> > > > also i had highlighted with a red background an error saying:
> > > > "Error:  Database table itemss for model Items was not found."
> >
> > > > I have configured and set cakephp properly when i visit
> localhost/todo
> > > > i receive confirmation that cakephp is able to connect to database ,
> > > > tmp folder is writable and i have all the css rendered.
> >
> > > > can someone please help me with this
> >
> > > > Forrestgump
>
> >
>

--~--~-~--~~~---~--~~
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: Missing Database Table

2008-09-10 Thread teknoid

Why is that a problem? It works exactly as it should...
If you do not wish to cache your models, you can disable it in
core.php (you shouldn't disable cache in production).

On Sep 10, 2:20 pm, "Luiz Poleto" <[EMAIL PROTECTED]> wrote:
> I've been having a few problems with Cake 1.2.0.7296 RC2 internal cache. If
> i change something in the database, those changes are not reflected in Cake,
> what causes a lot of error.Actually nothing to worry too much, since
> deleting the cache files is solving it. But i'm concerned about how far this
> problem goes.
>
> By the way, does anyone here having problem with that?
>
> Best regards,
> Luiz Poleto
>
> 2008/9/10 forrestgump <[EMAIL PROTECTED]>
>
>
>
> > Luiz Poleto
>
> >  Yea i checked my tables and all they were all perfect i tried the
> > delete the cache solution by bonitarunner, tht did the trickman
> > cake is wierd
>
> > Thanks a lot guys.saved me a lot of time.
>
> > On Sep 10, 8:07 pm, "Luiz Poleto" <[EMAIL PROTECTED]> wrote:
> > > Gump,
> > > Is this message correct?
>
> > > "Error:  Database table itemss for model Items was not found."
>
> > > Look at table name the message show: itemss. If that is the message Cake
> > has
> > > shown, then something is not properly configured, like the model class,
> > for
> > > example.
>
> > > Regards,
> > > Luiz Poleto
>
> > > 2008/9/10 bonitarunner <[EMAIL PROTECTED]>
>
> > > > Gump...Exact same thing happened to me!  Very frustrating.  I am
> > > > absolute beginner (following same todo example) but here is what I did
> > > > to get it to work.
>
> > > > 1)  Made another database called apress (not cake), then made items
> > > > table in phpAdmin, put same fields as in example.  Finally, changed
> > > > database.php settings to match to apress database.
> > > > 2)  turned off caching app\config\core.php    this line   > > > this>    Configure::write('Cache.disable', true);       > > > need to do this but I did anyway>
> > > > 3)  stopped wamp and restarted
> > > > 4)  refreshed todo/items in browser and works perfectly now.  No code
> > > > changes.
>
> > > > I also downloaded authors code from book site (exactly the same as
> > > > mine earlier with your same error).  He uses PHP shorthand so make
> > > > sure your  and  have  > > > 
> > > > Rough startbut it works now.  I hope it helps you.
>
> > > > On Sep 9, 3:39 am, forrestgump <[EMAIL PROTECTED]> wrote:
> > > > > Hey guys,
> > > > >  I'm new to cakephp and can't wait to get it fired up.i was
> > > > > creating a test app...and i followed the following steps:
>
> > > > > 1) created a database cake
> > > > > 2) placed my cake folder into my www folder and renamed it to "todo"
> > > > > 3) created a table "items" in database "cake"
> > > > > 4) configured my database.php respectively.
> > > > > 5) created an items_controller.php in \www\todo\app\controllers with
> > > > > the following code:
> > > > >  > > > >         class ItemsController extends AppController
> > > > >                 {
> > > > >                         var $name = 'Items';
> > > > >                         var $scaffold;
> > > > >                 }
> > > > > ?>
> > > > > 6) create an item.php in C:\wamp\www\todo\app\models with the
> > > > > following code:
> > > > >  > > > >         class Item extends AppModel
> > > > >                 {
> > > > >                         var $name = 'Item';
> > > > >                 }
> > > > > ?>
> > > > > 7) i visitedhttp://localhost/todo/itemstoseea nice message in red
> > > > > saying:
> > > > >      "Missing Database Table"
> > > > > also i had highlighted with a red background an error saying:
> > > > > "Error:  Database table itemss for model Items was not found."
>
> > > > > I have configured and set cakephp properly when i visit
> > localhost/todo
> > > > > i receive confirmation that cakephp is able to connect to database ,
> > > > > tmp folder is writable and i have all the css rendered.
>
> > > > > can someone please help me with this
>
> > > > > Forrestgump
--~--~-~--~~~---~--~~
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: Missing Database Table

2008-09-10 Thread scs

In the app/config/core.php do you have the debug set to 0 or 1 if it
is set to zero set it to 1,2, or 3 as this will keep refreshing your
cache.
>From what I have learned in the short time I been learning Cake the
cache doesn't refresh as much will in production mode (debug set to 0)
to help speed up the app.

On Sep 10, 2:20 pm, "Luiz Poleto" <[EMAIL PROTECTED]> wrote:
> I've been having a few problems with Cake 1.2.0.7296 RC2 internal cache. If
> i change something in the database, those changes are not reflected in Cake,
> what causes a lot of error.Actually nothing to worry too much, since
> deleting the cache files is solving it. But i'm concerned about how far this
> problem goes.
>
> By the way, does anyone here having problem with that?
>
> Best regards,
> Luiz Poleto
>
> 2008/9/10 forrestgump <[EMAIL PROTECTED]>
>
>
>
> > Luiz Poleto
>
> >  Yea i checked my tables and all they were all perfect i tried the
> > delete the cache solution by bonitarunner, tht did the trickman
> > cake is wierd
>
> > Thanks a lot guys.saved me a lot of time.
>
> > On Sep 10, 8:07 pm, "Luiz Poleto" <[EMAIL PROTECTED]> wrote:
> > > Gump,
> > > Is this message correct?
>
> > > "Error:  Database table itemss for model Items was not found."
>
> > > Look at table name the message show: itemss. If that is the message Cake
> > has
> > > shown, then something is not properly configured, like the model class,
> > for
> > > example.
>
> > > Regards,
> > > Luiz Poleto
>
> > > 2008/9/10 bonitarunner <[EMAIL PROTECTED]>
>
> > > > Gump...Exact same thing happened to me!  Very frustrating.  I am
> > > > absolute beginner (following same todo example) but here is what I did
> > > > to get it to work.
>
> > > > 1)  Made another database called apress (not cake), then made items
> > > > table in phpAdmin, put same fields as in example.  Finally, changed
> > > > database.php settings to match to apress database.
> > > > 2)  turned off caching app\config\core.php    this line   > > > this>    Configure::write('Cache.disable', true);       > > > need to do this but I did anyway>
> > > > 3)  stopped wamp and restarted
> > > > 4)  refreshed todo/items in browser and works perfectly now.  No code
> > > > changes.
>
> > > > I also downloaded authors code from book site (exactly the same as
> > > > mine earlier with your same error).  He uses PHP shorthand so make
> > > > sure your  and  have  > > > 
> > > > Rough startbut it works now.  I hope it helps you.
>
> > > > On Sep 9, 3:39 am, forrestgump <[EMAIL PROTECTED]> wrote:
> > > > > Hey guys,
> > > > >  I'm new to cakephp and can't wait to get it fired up.i was
> > > > > creating a test app...and i followed the following steps:
>
> > > > > 1) created a database cake
> > > > > 2) placed my cake folder into my www folder and renamed it to "todo"
> > > > > 3) created a table "items" in database "cake"
> > > > > 4) configured my database.php respectively.
> > > > > 5) created an items_controller.php in \www\todo\app\controllers with
> > > > > the following code:
> > > > >  > > > >         class ItemsController extends AppController
> > > > >                 {
> > > > >                         var $name = 'Items';
> > > > >                         var $scaffold;
> > > > >                 }
> > > > > ?>
> > > > > 6) create an item.php in C:\wamp\www\todo\app\models with the
> > > > > following code:
> > > > >  > > > >         class Item extends AppModel
> > > > >                 {
> > > > >                         var $name = 'Item';
> > > > >                 }
> > > > > ?>
> > > > > 7) i visitedhttp://localhost/todo/itemstoseea nice message in red
> > > > > saying:
> > > > >      "Missing Database Table"
> > > > > also i had highlighted with a red background an error saying:
> > > > > "Error:  Database table itemss for model Items was not found."
>
> > > > > I have configured and set cakephp properly when i visit
> > localhost/todo
> > > > > i receive confirmation that cakephp is able to connect to database ,
> > > > > tmp folder is writable and i have all the css rendered.
>
> > > > > can someone please help me with this
>
> > > > > Forrestgump
--~--~-~--~~~---~--~~
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: Missing Database Table

2008-09-10 Thread forrestgump

Luiz Poleto

  Yea i checked my tables and all they were all perfect i tried the
delete the cache solution by bonitarunner, tht did the trickman
cake is wierd

Thanks a lot guys.saved me a lot of time.



On Sep 10, 8:07 pm, "Luiz Poleto" <[EMAIL PROTECTED]> wrote:
> Gump,
> Is this message correct?
>
> "Error:  Database table itemss for model Items was not found."
>
> Look at table name the message show: itemss. If that is the message Cake has
> shown, then something is not properly configured, like the model class, for
> example.
>
> Regards,
> Luiz Poleto
>
> 2008/9/10 bonitarunner <[EMAIL PROTECTED]>
>
>
>
> > Gump...Exact same thing happened to me!  Very frustrating.  I am
> > absolute beginner (following same todo example) but here is what I did
> > to get it to work.
>
> > 1)  Made another database called apress (not cake), then made items
> > table in phpAdmin, put same fields as in example.  Finally, changed
> > database.php settings to match to apress database.
> > 2)  turned off caching app\config\core.php    this line   > this>    Configure::write('Cache.disable', true);       > need to do this but I did anyway>
> > 3)  stopped wamp and restarted
> > 4)  refreshed todo/items in browser and works perfectly now.  No code
> > changes.
>
> > I also downloaded authors code from book site (exactly the same as
> > mine earlier with your same error).  He uses PHP shorthand so make
> > sure your  and  have  > 
> > Rough startbut it works now.  I hope it helps you.
>
> > On Sep 9, 3:39 am, forrestgump <[EMAIL PROTECTED]> wrote:
> > > Hey guys,
> > >  I'm new to cakephp and can't wait to get it fired up.i was
> > > creating a test app...and i followed the following steps:
>
> > > 1) created a database cake
> > > 2) placed my cake folder into my www folder and renamed it to "todo"
> > > 3) created a table "items" in database "cake"
> > > 4) configured my database.php respectively.
> > > 5) created an items_controller.php in \www\todo\app\controllers with
> > > the following code:
> > >  > >         class ItemsController extends AppController
> > >                 {
> > >                         var $name = 'Items';
> > >                         var $scaffold;
> > >                 }
> > > ?>
> > > 6) create an item.php in C:\wamp\www\todo\app\models with the
> > > following code:
> > >  > >         class Item extends AppModel
> > >                 {
> > >                         var $name = 'Item';
> > >                 }
> > > ?>
> > > 7) i visitedhttp://localhost/todo/itemstosee a nice message in red
> > > saying:
> > >      "Missing Database Table"
> > > also i had highlighted with a red background an error saying:
> > > "Error:  Database table itemss for model Items was not found."
>
> > > I have configured and set cakephp properly when i visit localhost/todo
> > > i receive confirmation that cakephp is able to connect to database ,
> > > tmp folder is writable and i have all the css rendered.
>
> > > can someone please help me with this
>
> > > Forrestgump

--~--~-~--~~~---~--~~
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: Missing Database Table

2008-09-10 Thread Luiz Poleto
Gump,
Is this message correct?

"Error:  Database table itemss for model Items was not found."

Look at table name the message show: itemss. If that is the message Cake has
shown, then something is not properly configured, like the model class, for
example.

Regards,
Luiz Poleto

2008/9/10 bonitarunner <[EMAIL PROTECTED]>

>
> Gump...Exact same thing happened to me!  Very frustrating.  I am
> absolute beginner (following same todo example) but here is what I did
> to get it to work.
>
> 1)  Made another database called apress (not cake), then made items
> table in phpAdmin, put same fields as in example.  Finally, changed
> database.php settings to match to apress database.
> 2)  turned off caching app\config\core.phpthis line   this>Configure::write('Cache.disable', true);   need to do this but I did anyway>
> 3)  stopped wamp and restarted
> 4)  refreshed todo/items in browser and works perfectly now.  No code
> changes.
>
> I also downloaded authors code from book site (exactly the same as
> mine earlier with your same error).  He uses PHP shorthand so make
> sure your  and  have  
> Rough startbut it works now.  I hope it helps you.
>
>
> On Sep 9, 3:39 am, forrestgump <[EMAIL PROTECTED]> wrote:
> > Hey guys,
> >  I'm new to cakephp and can't wait to get it fired up.i was
> > creating a test app...and i followed the following steps:
> >
> > 1) created a database cake
> > 2) placed my cake folder into my www folder and renamed it to "todo"
> > 3) created a table "items" in database "cake"
> > 4) configured my database.php respectively.
> > 5) created an items_controller.php in \www\todo\app\controllers with
> > the following code:
> >  > class ItemsController extends AppController
> > {
> > var $name = 'Items';
> > var $scaffold;
> > }
> > ?>
> > 6) create an item.php in C:\wamp\www\todo\app\models with the
> > following code:
> >  > class Item extends AppModel
> > {
> > var $name = 'Item';
> > }
> > ?>
> > 7) i visitedhttp://localhost/todo/itemsto see a nice message in red
> > saying:
> >  "Missing Database Table"
> > also i had highlighted with a red background an error saying:
> > "Error:  Database table itemss for model Items was not found."
> >
> > I have configured and set cakephp properly when i visit localhost/todo
> > i receive confirmation that cakephp is able to connect to database ,
> > tmp folder is writable and i have all the css rendered.
> >
> > can someone please help me with this
> >
> > Forrestgump
>
> >
>

--~--~-~--~~~---~--~~
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: Missing Database Table

2008-09-10 Thread bonitarunner

Gump...Exact same thing happened to me!  Very frustrating.  I am
absolute beginner (following same todo example) but here is what I did
to get it to work.

1)  Made another database called apress (not cake), then made items
table in phpAdmin, put same fields as in example.  Finally, changed
database.php settings to match to apress database.
2)  turned off caching app\config\core.phpthis line  Configure::write('Cache.disable', true);  
3)  stopped wamp and restarted
4)  refreshed todo/items in browser and works perfectly now.  No code
changes.

I also downloaded authors code from book site (exactly the same as
mine earlier with your same error).  He uses PHP shorthand so make
sure your  and  have  wrote:
> Hey guys,
>  I'm new to cakephp and can't wait to get it fired up.i was
> creating a test app...and i followed the following steps:
>
> 1) created a database cake
> 2) placed my cake folder into my www folder and renamed it to "todo"
> 3) created a table "items" in database "cake"
> 4) configured my database.php respectively.
> 5) created an items_controller.php in \www\todo\app\controllers with
> the following code:
>          class ItemsController extends AppController
>                 {
>                         var $name = ‘Items’;
>                         var $scaffold;
>                 }
> ?>
> 6) create an item.php in C:\wamp\www\todo\app\models with the
> following code:
>          class Item extends AppModel
>                 {
>                         var $name = ‘Item’;
>                 }
> ?>
> 7) i visitedhttp://localhost/todo/itemsto see a nice message in red
> saying:
>      "Missing Database Table"
> also i had highlighted with a red background an error saying:
> "Error:  Database table itemss for model Items was not found."
>
> I have configured and set cakephp properly when i visit localhost/todo
> i receive confirmation that cakephp is able to connect to database ,
> tmp folder is writable and i have all the css rendered.
>
> can someone please help me with this
>
> Forrestgump

--~--~-~--~~~---~--~~
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: Missing Database Table

2008-09-09 Thread Günther Theilen

Hi,

forrestgump:
> "Error:  Database table itemss for model Items was not found."

you should check your model.
Is it called "items" instead of "item"?

regards
Guenther


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



Missing Database Table

2008-09-09 Thread forrestgump

Hey guys,
 I'm new to cakephp and can't wait to get it fired up.i was
creating a test app...and i followed the following steps:

1) created a database cake
2) placed my cake folder into my www folder and renamed it to "todo"
3) created a table "items" in database "cake"
4) configured my database.php respectively.
5) created an items_controller.php in \www\todo\app\controllers with
the following code:

6) create an item.php in C:\wamp\www\todo\app\models with the
following code:

7) i visited http://localhost/todo/items to see a nice message in red
saying:
 "Missing Database Table"
also i had highlighted with a red background an error saying:
"Error:  Database table itemss for model Items was not found."

I have configured and set cakephp properly when i visit localhost/todo
i receive confirmation that cakephp is able to connect to database ,
tmp folder is writable and i have all the css rendered.

can someone please help me with this

Forrestgump




--~--~-~--~~~---~--~~
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: Missing database table

2008-06-21 Thread Siebren Bakker
@Joel
I'd never fully read the API documentation on Model::find and Model::findAll
before, thanks for the advice, find('all') works a lot better for what I
needed done!

In the name of Life, Liberty, and the pursuit of my sanity.
Siebren Bakker(Aevum Decessus)

On Fri, Jun 20, 2008 at 12:58, Joel Perras <[EMAIL PROTECTED]> wrote:

>
> On Jun 20, 11:52 am, "Siebren Bakker" <[EMAIL PROTECTED]>
> wrote:
>
> > I'm not selecting more information than I need. findAll > find in most
> > situations, especially because of the recursive option.
>
> Really?  That's odd, because findAll() is nothing more than a
> (deprecated) wrapper for find('all').  Actually, there are things that
> you can do with Model::find('all', ..) that are impossible with
> Model::findAll(), such as providing options to the new Containable
> behavior.
>
> Read the API if you have some free time.  It's often quite
> enlightening.
>
> -Joel.
> >
>

--~--~-~--~~~---~--~~
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: Missing database table

2008-06-20 Thread Joel Perras

On Jun 20, 11:52 am, "Siebren Bakker" <[EMAIL PROTECTED]>
wrote:

> I'm not selecting more information than I need. findAll > find in most
> situations, especially because of the recursive option.

Really?  That's odd, because findAll() is nothing more than a
(deprecated) wrapper for find('all').  Actually, there are things that
you can do with Model::find('all', ..) that are impossible with
Model::findAll(), such as providing options to the new Containable
behavior.

Read the API if you have some free time.  It's often quite
enlightening.

-Joel.
--~--~-~--~~~---~--~~
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: Missing database table

2008-06-20 Thread Siebren Bakker
@Marsellus. Makes sense, I ran into this problem in the beta version of my
site, which has debug set to 2 so I can see the SQL dump, and make sure that
I'm not selecting more information than I need. findAll > find in most
situations, especially because of the recursive option.

In the name of Life, Liberty, and the pursuit of my sanity.
Siebren Bakker(Aevum Decessus)

On Fri, Jun 20, 2008 at 08:58, Marcelius <[EMAIL PROTECTED]> wrote:

>
> If you turn debug mode to 1, cache is refreshed so any changes in the
> database will be recognized :-)
>
> On 20 jun, 11:06, leo <[EMAIL PROTECTED]> wrote:
> > On 20 Juny, 10:33, "Siebren Bakker" <[EMAIL PROTECTED]> wrote:
> >
> > > I ran into a similar problem, and found an interesting solution that
> took
> > > care of it right away. Clear out the contents of your
> /app/tmp/cache/models
> > > folder, and then try again and it should recognize your database tables
> if
> > > they exist.
> >
> > Good call! I usually disable caching for development for this and
> > myriad similar reasons.
> >
>

--~--~-~--~~~---~--~~
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: Missing database table

2008-06-20 Thread Marcelius

If you turn debug mode to 1, cache is refreshed so any changes in the
database will be recognized :-)

On 20 jun, 11:06, leo <[EMAIL PROTECTED]> wrote:
> On 20 Juny, 10:33, "Siebren Bakker" <[EMAIL PROTECTED]> wrote:
>
> > I ran into a similar problem, and found an interesting solution that took
> > care of it right away. Clear out the contents of your /app/tmp/cache/models
> > folder, and then try again and it should recognize your database tables if
> > they exist.
>
> Good call! I usually disable caching for development for this and
> myriad similar reasons.
--~--~-~--~~~---~--~~
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: Missing database table

2008-06-20 Thread leo

On 20 Juny, 10:33, "Siebren Bakker" <[EMAIL PROTECTED]> wrote:
> I ran into a similar problem, and found an interesting solution that took
> care of it right away. Clear out the contents of your /app/tmp/cache/models
> folder, and then try again and it should recognize your database tables if
> they exist.

Good call! I usually disable caching for development for this and
myriad similar reasons.
--~--~-~--~~~---~--~~
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: Missing database table

2008-06-20 Thread Siebren Bakker
I ran into a similar problem, and found an interesting solution that took
care of it right away. Clear out the contents of your /app/tmp/cache/models
folder, and then try again and it should recognize your database tables if
they exist.

In the name of Life, Liberty, and the pursuit of my sanity.
Siebren Bakker(Aevum Decessus)

On Fri, Jun 20, 2008 at 03:10, leo <[EMAIL PROTECTED]> wrote:

>
> I guess if bake doesn't work, Cake can't see the tables. Make sure
> they are defined in the same database as users (!)
>
> Check your database config file in app/config - make sure that the
> stated user has access to the tables.
>
> Make sure that the model filenames are correct and correctly located
> (although the error message suggests all is correct there)
>
>
> On 20 Juny, 02:18, KURT <[EMAIL PROTECTED]> wrote:
> > Below is the codes that I have done.
> >
> >  > class Product extends AppModel
> > {
> > var $name = 'Product';
> > var $belongsTo = array ('Dealer' =>
> > array(
> > 'className'  => 'Dealer',
> > 'conditions' => '',
> > 'order'  => '',
> > 'foreignKey' => 'dealer_id'
> > )
> > );}
> >
> > ?>
> >
> >  > class Dealer extends AppModel
> > {
> > var $name = 'Dealer';
> > var $hasMany = array ('Product' =>
> > array(
> > 'className'  => 'Product',
> > 'conditions' => '',
> > 'order'  => '',
> > 'foreignKey' => 'dealer_id'
> > )
> > );}
> >
> > ?>
> >
> >  > class ProductsController extends AppController
> > {
> > var $scaffold;}
> >
> > ?>
> >
> >  > class DealersController extends AppController
> > {
> > var $scaffold;}
> >
> > ?>
> >
> > The tables 'dealers' and 'products' exists.
> >
> > My problem is when I access 
> > 'http://localhost/cookup/dealers'and
> > 'http://localhost/cookup/products', cake give me an error 'Error:
> > Database table dealers for model Dealer was not found.' or 'Error:
> > Database table products for model Product was not found.'.
> >
> > Furthermore, when I try to use bake, I cannot bake dealer and
> > products.
> >
> > I have another table called 'users' and that table is fine.
> >
> > What is my problem?
> >
>

--~--~-~--~~~---~--~~
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: Missing database table

2008-06-20 Thread leo

I guess if bake doesn't work, Cake can't see the tables. Make sure
they are defined in the same database as users (!)

Check your database config file in app/config - make sure that the
stated user has access to the tables.

Make sure that the model filenames are correct and correctly located
(although the error message suggests all is correct there)


On 20 Juny, 02:18, KURT <[EMAIL PROTECTED]> wrote:
> Below is the codes that I have done.
>
>  class Product extends AppModel
> {
>         var $name = 'Product';
>         var $belongsTo = array ('Dealer' =>
>                 array(
>                         'className'  => 'Dealer',
>                         'conditions' => '',
>                         'order'      => '',
>                         'foreignKey' => 'dealer_id'
>                 )
>         );}
>
> ?>
>
>  class Dealer extends AppModel
> {
>         var $name = 'Dealer';
>         var $hasMany = array ('Product' =>
>                 array(
>                         'className'  => 'Product',
>                         'conditions' => '',
>                         'order'      => '',
>                         'foreignKey' => 'dealer_id'
>                 )
>         );}
>
> ?>
>
>  class ProductsController extends AppController
> {
>         var $scaffold;}
>
> ?>
>
>  class DealersController extends AppController
> {
>         var $scaffold;}
>
> ?>
>
> The tables 'dealers' and 'products' exists.
>
> My problem is when I access 'http://localhost/cookup/dealers'and
> 'http://localhost/cookup/products', cake give me an error 'Error:
> Database table dealers for model Dealer was not found.' or 'Error:
> Database table products for model Product was not found.'.
>
> Furthermore, when I try to use bake, I cannot bake dealer and
> products.
>
> I have another table called 'users' and that table is fine.
>
> What is my problem?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Missing database table

2008-06-19 Thread KURT

Below is the codes that I have done.


array(
'className'  => 'Dealer',
'conditions' => '',
'order'  => '',
'foreignKey' => 'dealer_id'
)
);
}
?>


array(
'className'  => 'Product',
'conditions' => '',
'order'  => '',
'foreignKey' => 'dealer_id'
)
);
}
?>





The tables 'dealers' and 'products' exists.

My problem is when I access 'http://localhost/cookup/dealers' and
'http://localhost/cookup/products', cake give me an error 'Error:
Database table dealers for model Dealer was not found.' or 'Error:
Database table products for model Product was not found.'.

Furthermore, when I try to use bake, I cannot bake dealer and
products.

I have another table called 'users' and that table is fine.

What is my problem?

--~--~-~--~~~---~--~~
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: Oracle Database Missing Database Table

2008-01-23 Thread Chris

Try using views.

We have a lot of tables that can't be changed so we just made views
for them all to fit Cake's needs.

You can also set primaryId for each model.  Not sure about the table
naming convention.

On Jan 23, 1:29 pm, oalcarj <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am using CakePHP 1.2 beta and am able to establish a connection to
> an Oracle 10g database on the cake homepage.  This database however
> does not follow Cake's table naming conventions.  All table names are
> singular,  upper case and primary keys do not have "id" in them.  This
> cannot be changed.
>
> I am trying to generate a list of employees. I have created an
> Employee class in the model and have set the $useTable attribute
> equal  to 'EMPLOYEE' .  When I try to run $this->Employee->findAll()
> from the controller I receive a Missing Database Table error with the
> following message:
>
> "Error:  Database table EMPLOYEE for model Employee was not found.".
>
> The controller has been created per Cake's convention.  Am I missing a
> configuration step anywhere in Cake?   Any suggestions are greatly
> appreciated.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Oracle Database Missing Database Table

2008-01-23 Thread oalcarj

Hello,

I am using CakePHP 1.2 beta and am able to establish a connection to
an Oracle 10g database on the cake homepage.  This database however
does not follow Cake's table naming conventions.  All table names are
singular,  upper case and primary keys do not have "id" in them.  This
cannot be changed.

I am trying to generate a list of employees. I have created an
Employee class in the model and have set the $useTable attribute
equal  to 'EMPLOYEE' .  When I try to run $this->Employee->findAll()
from the controller I receive a Missing Database Table error with the
following message:

"Error:  Database table EMPLOYEE for model Employee was not found.".

The controller has been created per Cake's convention.  Am I missing a
configuration step anywhere in Cake?   Any suggestions are greatly
appreciated.


--~--~-~--~~~---~--~~
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: Bakery article on "Testing Models" -- Missing Database Table

2007-12-20 Thread daphonz

Hello,

I've been having a very similar problem in 1.2.5875.  I followed the
above tips, using them to modify the instructions in the Bakery
article.  It looks like the fixture tables are being created, but that
I am unable to access any data from them.  For example:

My user_test_fixture.php:

class UserTestFixture extends CakeTestFixture {
var $name = 'UserTest';
var $import = array('table' => 'users');
var $records = array(
array ('id' => 1, 'group_id' => '1', 'username' => 'admin',
'passwd' => '21232f297a57a5a743894a0e4a801fc3', 'name' => 'Admin
User', 'email'=>'[EMAIL PROTECTED]','last_visit'=>'2007-03-18
10:41:31', 'active'=>'1', 'created'=>'2007-01-18
10:41:31','created_by_user_id'=>'1','modified' => '2007-03-18
10:41:31','modified_by_user_id'=>'1'),
array ('id' => 2, 'group_id' => '2', 'username' => 'testuser',
'password' => '5d9c68c6c50ed3d02a2fcf54f63993b6', 'name' => 'Test
User', 'email'=>'[EMAIL PROTECTED]','last_visit'=>'2007-03-18
10:41:31', 'active'=>'1', 'created'=>'2007-01-18
10:41:31','created_by_user_id'=>'1','modified' => '2007-03-18
10:41:31','modified_by_user_id'=>'1')
);
}

Here is my user.test.php:

UserTest =& new UserTest();
}

function endTest($method) {
unset($this->UserTest);
}


function testCheckUserExistence() {

/* Existing Username */
/* The command pr($this->UserTest->find('count'));
retuns 0 here */

$result = $this->UserTest->checkUserExistence('admin');
$this->assertTrue($result,'User, admin, should be found');
}
}
?>

So, yes, the test method reports a failure.  Can anyone offer some
help or suggestions?  It would be greatly, greatly appreciated.






On Dec 20, 11:06 am, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> That's because setUp should not be used with test cases that descend from
> CakeTestCase (i.e: test cases with fixtures) or you are going to get those
> nasty side effects. Instead use their equivalents:
>
> startCase(): called ONCE during the execution of ALL test methods, and right
> before the first test method is executed
>
> endCase(): called ONCE, after all test methods have executed
>
> startTest($method): called right before EACH test method is executed, and
> the parameter $method includes the name of the test method that is about to
> start
>
> endTest($method): called right after EACH test method is executed, and the
> parameter $method includes the name of the test method that has just
> finished executing
>
> -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 Philip
> Enviado el: Jueves, 20 de Diciembre de 2007 12:50 p.m.
> Para: Cake PHP
> Asunto: Re: Bakery article on "Testing Models" -- Missing Database Table
>
> I also am finding that if I try to load the "...Test" model in the
> setUp, the Missing Database Table resurface

--~--~-~--~~~---~--~~
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: Bakery article on "Testing Models" -- Missing Database Table

2007-12-20 Thread Mariano Iglesias

That's because setUp should not be used with test cases that descend from
CakeTestCase (i.e: test cases with fixtures) or you are going to get those
nasty side effects. Instead use their equivalents:

startCase(): called ONCE during the execution of ALL test methods, and right
before the first test method is executed

endCase(): called ONCE, after all test methods have executed

startTest($method): called right before EACH test method is executed, and
the parameter $method includes the name of the test method that is about to
start

endTest($method): called right after EACH test method is executed, and the
parameter $method includes the name of the test method that has just
finished executing

-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 Philip
Enviado el: Jueves, 20 de Diciembre de 2007 12:50 p.m.
Para: Cake PHP
Asunto: Re: Bakery article on "Testing Models" -- Missing Database Table

I also am finding that if I try to load the "...Test" model in the
setUp, the Missing Database Table resurfaces:


--~--~-~--~~~---~--~~
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: Bakery article on "Testing Models" -- Missing Database Table

2007-12-20 Thread Philip

Thanks, I appreciate the suggestions.

Along the way I found a simple naming issue that was screwing up my
fixtures: I had named my file tournament_games_test_fixture.php
instead of the singular, tournament_game_test_fixture.php.

I also am finding that if I try to load the "...Test" model in the
setUp, the Missing Database Table resurfaces:

function setUp() {
$this->TestObject = new TournamentGameTest();
}


But if I instead don't use TournamentGameTest until the test, we're
fine:

  function testFindAll() {
  $this->TournamentGameTest =& new TournamentGameTest();
  $result = $this->TournamentGameTest->findAll();
//...
  }

Thanks again for your help!

- Philip


On Dec 19, 11:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Look at example:
> 1) App::import instead of loadModel
> 2) in model declaration add useTable and clean unnecessery
> associations.
>   If you need some association from real model you should redeclare
> all models in this test case.
> 3) If test case declaration - need to declare fixture.
> 4) Fixture possible to create based on "cake scema generate" script
> result.
>
> App::import("Model", 'Flag');
> class FlagTest extends Flag {
> var $name = 'Flag';
> var $useTable = 'flag_tests';
> var $useDbConfig = 'test_suite';
> var $cacheSources = false;
> var $belongsTo = array();
> var $hasOne = array();
> var $hasMany = array();
> var $hasAndBelongsToMany = array();
>
> }
>
> class FlagTestCase extends CakeTestCase {
> var $TestObject = null;
> var $fixtures = array('flag_test',  );
>
> function testItShouldGroupFlags() {
> $this->Flag = new FlagTest();
> }
>
> }
--~--~-~--~~~---~--~~
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: Bakery article on "Testing Models" -- Missing Database Table

2007-12-19 Thread [EMAIL PROTECTED]

Look at example:
1) App::import instead of loadModel
2) in model declaration add useTable and clean unnecessery
associations.
  If you need some association from real model you should redeclare
all models in this test case.
3) If test case declaration - need to declare fixture.
4) Fixture possible to create based on "cake scema generate" script
result.


App::import("Model", 'Flag');
class FlagTest extends Flag {
var $name = 'Flag';
var $useTable = 'flag_tests';
var $useDbConfig = 'test_suite';
var $cacheSources = false;
var $belongsTo = array();
var $hasOne = array();
var $hasMany = array();
var $hasAndBelongsToMany = array();
}



class FlagTestCase extends CakeTestCase {
var $TestObject = null;
var $fixtures = array('flag_test',  );

function testItShouldGroupFlags() {
$this->Flag = new FlagTest();
}
}

--~--~-~--~~~---~--~~
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: Bakery article on "Testing Models" -- Missing Database Table

2007-12-19 Thread daphonz

I found that instead of following that article completely, I modified
one of the baked model tests, which had two extra functions, setUp and
tearDown:

class UserTestCase extends CakeTestCase {

var $fixtures = array( 'user_test' );

function setUp() {
$this->UserTest =& new User();
}

function tearDown() {
unset($this->UserTest);
}

   function testStuff() {
   }

}

And there I initialize the User model as $this->UserTest in the setUp
function.  Everything else from the article I followed, and it seemed
to work fine (with the fixture data and everything).

Hope this helps.

-Casey


On Dec 19, 2:50 pm, Philip <[EMAIL PROTECTED]> wrote:
> I'm attempting to apply the Bakery article "Testing Models with
> CakePHP 1.2 test suite" <http://bakery.cakephp.org/articles/view/
> testing-models-with-cakephp-1-2-test-suite> by Mariano Iglesias to my
> own testing, but I'm getting Missing Database Table for my *Test
> class.
>
> Is anyone successfully using these techniques and willing to volunteer
> to answer questions?   Technical details of my specific issue follow.
>
> =
> I'm try to adapt Mariano's examples to a test for the TournamentGame
> model, so my derived class should be this, right?:
>
> loadModel('TournamentGame');
>
> class TournamentGameTest extends TournamentGame {
> var $name = 'TournamentGameTest';
> var $useDbConfig = 'test_suite';
>
> }
>
> But I get this error:
>
> Missing Database Table
>
> No Database table for model TournamentGameTest (expected
> test_suite_tournament_game_tests), create it first.
>
> Notice: If you want to customize this error message, create app\views
> \errors\missing_table.ctp
>
> I was under the impression from the article that CakePHP automagically
> knows that the *Test derived class corresponds to the model, but
> perhaps I'm misunderstanding something, or perhaps it's changed in
> present versions.
>
> I notice that it's correctly applying the test_suite prefix, but I was
> under the impression that those needed tables are automatically
> created during the execution of the test.   Am I missing something
> here?
>
> I'm on SVN revision 6123, by the way.
>
> =
>
> Thanks,
>
> Philip
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Bakery article on "Testing Models" -- Missing Database Table

2007-12-19 Thread Philip

I'm attempting to apply the Bakery article "Testing Models with
CakePHP 1.2 test suite" <http://bakery.cakephp.org/articles/view/
testing-models-with-cakephp-1-2-test-suite> by Mariano Iglesias to my
own testing, but I'm getting Missing Database Table for my *Test
class.

Is anyone successfully using these techniques and willing to volunteer
to answer questions?   Technical details of my specific issue follow.

=
I'm try to adapt Mariano's examples to a test for the TournamentGame
model, so my derived class should be this, right?:


loadModel('TournamentGame');

class TournamentGameTest extends TournamentGame {
var $name = 'TournamentGameTest';
var $useDbConfig = 'test_suite';
}


But I get this error:


Missing Database Table

No Database table for model TournamentGameTest (expected
test_suite_tournament_game_tests), create it first.

Notice: If you want to customize this error message, create app\views
\errors\missing_table.ctp


I was under the impression from the article that CakePHP automagically
knows that the *Test derived class corresponds to the model, but
perhaps I'm misunderstanding something, or perhaps it's changed in
present versions.

I notice that it's correctly applying the test_suite prefix, but I was
under the impression that those needed tables are automatically
created during the execution of the test.   Am I missing something
here?

I'm on SVN revision 6123, by the way.

=

Thanks,

Philip
--~--~-~--~~~---~--~~
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: Missing database table trying to bake a model

2007-11-20 Thread RichardAtHome

Recently, they changed the way that bake runs (tripped me up too).

You need to run it from your /app directory

and add the bake directory to your path.

There's a note at the top of bake.bat script that gives better/fuller
instructions.

Hope this helps

On Nov 20, 10:03 am, Scronkey <[EMAIL PROTECTED]> wrote:
> You mean you copied the whole 'console' directory into your app
> directory?
>
> I can't see how that would make a difference as far as baking models
> go, but even if it did it doesn't seem a very efficient solution
> considering how many directories and files are in the console
> directory.
>
> Out of interest, how many databases are you connecting to, and what
> engine are they using?
>
> On Nov 20, 3:51 pm, uae2k <[EMAIL PROTECTED]> wrote:
>
> > well ... maybe this is the solution
>
> > I have copied "console" to the "app" folder and it works fine with me
>
> > On Nov 20, 8:30 am, uae2k <[EMAIL PROTECTED]> wrote:
>
> > > I have the same problem and I tried your way but without any result
>
> > > Any one can help here !
--~--~-~--~~~---~--~~
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: Missing database table trying to bake a model

2007-11-20 Thread Scronkey

You mean you copied the whole 'console' directory into your app
directory?

I can't see how that would make a difference as far as baking models
go, but even if it did it doesn't seem a very efficient solution
considering how many directories and files are in the console
directory.

Out of interest, how many databases are you connecting to, and what
engine are they using?

On Nov 20, 3:51 pm, uae2k <[EMAIL PROTECTED]> wrote:
> well ... maybe this is the solution
>
> I have copied "console" to the "app" folder and it works fine with me
>
> On Nov 20, 8:30 am, uae2k <[EMAIL PROTECTED]> wrote:
>
> > I have the same problem and I tried your way but without any result
>
> > Any one can help here !
--~--~-~--~~~---~--~~
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: Missing database table trying to bake a model

2007-11-19 Thread uae2k

well ... maybe this is the solution

I have copied "console" to the "app" folder and it works fine with me

On Nov 20, 8:30 am, uae2k <[EMAIL PROTECTED]> wrote:
> I have the same problem and I tried your way but without any result
>
> Any one can help here !

--~--~-~--~~~---~--~~
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: Missing database table trying to bake a model

2007-11-19 Thread uae2k

I have the same problem and I tried your way but without any result

Any one can help here !

--~--~-~--~~~---~--~~
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: Missing database table trying to bake a model

2007-11-13 Thread Scronkey

I have found out why this was happening and with two very small
adjustments in cake/console/libs/tasks/model.php I can successfully
bake models in either the mysql or the firebird database.

All the functionality is there and ready to go, it just appears it has
yet to be 'turned on'. (using latest branch checkout)

In the function __interactive, a new model is created twice with the
following code:
tempModel = new Model(false, $useTable);
this is after the request if validation is required, and
tempOtherModel = new Model(false, $useTable);
this is after the request if associations are required.

However, the constructor for Model can take a third parameter, $ds,
but as this is not passed in either case, the new Model uses the
'default' dbConfig.

Once I added the existing variable $useDbConfig to both calls, such
as:
tempModel = new Model(false, $useTable, $useDbConfig);
the models are correctly baked.

My concern now is why is this functionality not enabled?
Am I going about this the wrong way?
I could not find any tickets on this so if this is the correct way,
should I write a ticket?

If I'm on the right track I will investigate the related problem when
trying to bake the relevant controllers and views, which currently
only display the list of 'default' models when I try to use my
alternate firebird database config.

If I'm not on the right track, can anyone enlighten me?

On Nov 11, 12:31 pm, Scronkey <[EMAIL PROTECTED]> wrote:
> This occurs when trying to setup an additional database connection to
> a Firebird server.
>
> I'm using mysql for the bulk of my app (with no problems), but in
> trying to set up access to a few tables in my Firebird db some oddness
> occurs.
>
> I have the entry in the database.sql config file and bake presents me
> with the correct list of tables to choose from when I try to create a
> model so it can obviously successfully connect to the server and
> database in question. When presented with the first question
> (supplying validation criteria) I get the following error (regardless
> if want validation or not):
>
> Error: Missing database table 'employees' for model 'Model'
>
> Note that the table name is correct, but it seems to be trying to
> locate a model called 'Model'.
> This oddness made me think that could be a bug, (also considering cake
> can connect and return a list of tables) so I started hunting. Several
> hours have passed and I'm now getting quite lost and cross-eyed from
> the code and was hoping someone with more familiarity of Cake's
> innards could help.
>
> I've traced the error to the __interactive function in console/libs/
> tasks/model.php, to the line:
> $tempModel = new Model(false, $useTable);
>
> I assumed this is a call to the __construct method in cake/libs/model/
> model.php but I'm lost trying get any further.
>
> If no one has an immediate thought of why this occurs, then perhaps
> someone can tell me how can I get diagnostic messages from within
> model.php? As there is no active browser (shell bake) and I can't seem
> to access the shell->out() function to dump messages I can't easily
> narrow down where this actually falls over.
>
> Any advice or tips ?


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



Missing database table trying to bake a model

2007-11-10 Thread Scronkey

This occurs when trying to setup an additional database connection to
a Firebird server.

I'm using mysql for the bulk of my app (with no problems), but in
trying to set up access to a few tables in my Firebird db some oddness
occurs.

I have the entry in the database.sql config file and bake presents me
with the correct list of tables to choose from when I try to create a
model so it can obviously successfully connect to the server and
database in question. When presented with the first question
(supplying validation criteria) I get the following error (regardless
if want validation or not):

Error: Missing database table 'employees' for model 'Model'

Note that the table name is correct, but it seems to be trying to
locate a model called 'Model'.
This oddness made me think that could be a bug, (also considering cake
can connect and return a list of tables) so I started hunting. Several
hours have passed and I'm now getting quite lost and cross-eyed from
the code and was hoping someone with more familiarity of Cake's
innards could help.

I've traced the error to the __interactive function in console/libs/
tasks/model.php, to the line:
$tempModel = new Model(false, $useTable);

I assumed this is a call to the __construct method in cake/libs/model/
model.php but I'm lost trying get any further.

If no one has an immediate thought of why this occurs, then perhaps
someone can tell me how can I get diagnostic messages from within
model.php? As there is no active browser (shell bake) and I can't seem
to access the shell->out() function to dump messages I can't easily
narrow down where this actually falls over.

Any advice or tips ?


--~--~-~--~~~---~--~~
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: missing database table / camelcase error

2007-10-14 Thread Adam D

Ugh. To document my own ineptitude... The issue was that the new
server had the site defaulted to php4. An argument for setting $name
properly, I suppose.

- Adam

On Oct 14, 8:26 pm, Adam D <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I just moved my site to a new server and I'm getting a "missing
> database error" for all of my model. Cake appears to be omitting the
> underscores on the conversion from model name to database table, so,
> for a model like GroupType, it's looking for a table named
> "grouptypes" instead of "group_types". Where is this conversion
> controlled? How could a move between servers have caused this error?
> FWIW, if I set $useTable explicitly, everything works.
>
> - Adam


--~--~-~--~~~---~--~~
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: missing database table / camelcase error

2007-10-14 Thread Grant Cox

Are you using PHP4 on the live server?  Are you forgetting to have
var $name = 'GroupType'
at the top of your models?

PHP4 cannot get a case sensitive version of a class name - so when it
looks at your model it assumes it to be "Groupttype", unless you have
a var $name with the correct case.


On Oct 15, 10:26 am, Adam D <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I just moved my site to a new server and I'm getting a "missing
> database error" for all of my model. Cake appears to be omitting the
> underscores on the conversion from model name to database table, so,
> for a model like GroupType, it's looking for a table named
> "grouptypes" instead of "group_types". Where is this conversion
> controlled? How could a move between servers have caused this error?
> FWIW, if I set $useTable explicitly, everything works.
>
> - Adam


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



missing database table / camelcase error

2007-10-14 Thread Adam D

Hi,

I just moved my site to a new server and I'm getting a "missing
database error" for all of my model. Cake appears to be omitting the
underscores on the conversion from model name to database table, so,
for a model like GroupType, it's looking for a table named
"grouptypes" instead of "group_types". Where is this conversion
controlled? How could a move between servers have caused this error?
FWIW, if I set $useTable explicitly, everything works.

- Adam


--~--~-~--~~~---~--~~
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: Missing Database Table

2006-07-21 Thread John Zimmerman [gmail]
no problem.  glad it works.On 7/21/06, Matt2012 <[EMAIL PROTECTED]> wrote:
Argh! username was connecting but didnt have permission on that tablechanged it toon that has full access problem solved! Sorry for wasting your time onthis, but your questions stopped me going round and round in circles so
thanks anyway.
--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---


Re: Missing Database Table

2006-07-21 Thread Matt2012

Argh! username was connecting but didnt have permission on that table
changed it to
on that has full access problem solved! Sorry for wasting your time on
this, but your questions stopped me going round and round in circles so
thanks anyway.


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



Re: Missing Database Table

2006-07-21 Thread Matt2012

class DATABASE_CONFIG
{
var $default = array('driver' => 'mysql',
'connect' => 
'mysql_connect',
'host' => 
'localhost',
'login' => 
'',
'password' => 
'',
'database' => 
'X',
'prefix' => '');

}

for security ive hidden the database name but I have double checked
that its right on the right server and contains the table trains ps it
wont recognise any tables for any models - there will be something
really obvious but I cant work out what. I have other sites working on
this server so mod_rewrite etc is ok...


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



Re: Missing Database Table

2006-07-21 Thread John Zimmerman [gmail]
One more thing before I think I am stumped.Can you post the contents of your /app/config/database.php file?So far everything looks ok as far as I can tell.If someone can't figure it out after that you might hop on the IRC channel and see if you can pick somebody's brain there.
On 7/21/06, Matt2012 <[EMAIL PROTECTED]> wrote:
Apache version  1.3.34 (Unix)MySQL version   4.1.19-standardPHP version 4.4.2//
-- -- Table structure for trains-- CREATE TABLE `trains`(`id` int(11) NOT NULL AUTO_INCREMENT ,`start_loc` varchar(255) ,`end_loc` varchar(255) ,
`start_datetime` datetime ,`end_datetime` datetime ,`created` datetime ,`updated` datetime ,PRIMARY KEY (`id`)) TYPE=MyISAM;
//ERROR ON DEBUG  3Missing Database TableNo Database table for model Train (expected "trains"), create it first.Notice: this error is being rendered by the
app/views/errors/missing_table.thtml view file, a user-customizableerror page.0 query took ms Nr  Query   Error   AffectedNum. rows   Took (ms)

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


Re: Missing Database Table

2006-07-21 Thread Matt2012

Apache version  1.3.34 (Unix)
MySQL version   4.1.19-standard
PHP version 4.4.2
//

-- 
-- Table structure for trains
-- 
CREATE TABLE `trains`(
`id` int(11) NOT NULL AUTO_INCREMENT ,
`start_loc` varchar(255) ,
`end_loc` varchar(255) ,
`start_datetime` datetime ,
`end_datetime` datetime ,
`created` datetime ,
`updated` datetime ,
PRIMARY KEY (`id`)) TYPE=MyISAM;


//ERROR ON DEBUG  3

Missing Database Table

No Database table for model Train (expected "trains"), create it first.

Notice: this error is being rendered by the
app/views/errors/missing_table.thtml view file, a user-customizable
error page.
0 query took ms Nr  Query   Error   AffectedNum. rows   Took 
(ms)




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



Re: Missing Database Table

2006-07-21 Thread John Zimmerman [gmail]
What versions of the following are you using: PHP, DB Type and Version (i.e. MySQL 5),  CakePHP?What operating system are you running the webserver on?And can you dump the SQL schema for your database as well?
One thing to double check is that the table name is the plural form instead of singular.  i.e. 'trains' instead of 'train'Set your debuge level in /app/config/core.php to 3 as well to get some more error messages.
On 7/21/06, Matt2012 <[EMAIL PROTECTED]> wrote:
well theres not all that much to it (I think you can ignore the view?)http://www.cakephp.org/pastes/show/2f021e23b8505de6867f55b79f090276
I appreciate the extra eyes..!
--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---


Re: Missing Database Table

2006-07-21 Thread Matt2012

well theres not all that much to it (I think you can ignore the view?)

http://www.cakephp.org/pastes/show/2f021e23b8505de6867f55b79f090276

I appreciate the extra eyes..!


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



Re: Missing Database Table

2006-07-21 Thread John Zimmerman [gmail]
http://www.cakephp.org/pastes/addCan you create some pastes of your code?On 7/21/06, Matt2012 <
[EMAIL PROTECTED]> wrote:Dont know whats happening - CAKE loading fine the homepage
definitely connecting to the right database but what ever table I putinuseTable its saying its missing. (I started off with the default table'trains' for model Train).Not had this problem before.
Anyone any ideas?
--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---


Missing Database Table

2006-07-21 Thread Matt2012

Dont know whats happening - CAKE loading fine the homepage
definitely connecting to the right database but what ever table I put
in
useTable its saying its missing. (I started off with the default table
'trains' for model Train).
Not had this problem before.

Anyone any ideas?


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