Hello All,

I am hoping someone here has some ideas on this one.  I'm working on
creating a very simple app using CakePHP 1.2 (from
cake_1.2.0.6311-beta.zip).

At this point I've created a very simple table and I'm simply trying to do
an index that does find all.  Here is what I am getting:

SNIP:
-------------------

Warning (2): ociexecute() [function.ociexecute]: ORA-00923: FROM keyword
not found where expected
[CORE/cake/libs/model/datasources/dbo/dbo_oracle.php, line 291]

Code | Context
$sql    =       "SELECT User.id, User.email, User.password, User.question,
User.answer, User.modified_date, User.modified_by,
User.failed_login_attempts, User.locked FROM users User   WHERE 1 = 1  "
$mode   =       32

Warning: implode() [function.implode]: Invalid arguments passed in
/var/www/http/eservice/cake/libs/debugger.php on line 497


ociexecute - [internal], line ??
DboOracle::_execute() -
CORE/cake/libs/model/datasources/dbo/dbo_oracle.php, line 291
DboSource::execute() - CORE/cake/libs/model/datasources/dbo_source.php,
line 155
DboSource::fetchAll() - CORE/cake/libs/model/datasources/dbo_source.php,
line 297
DboSource::read() - CORE/cake/libs/model/datasources/dbo_source.php, line 565
Model::find() - CORE/cake/libs/model/model.php, line 1752
Model::findAll() - CORE/cake/libs/model/model.php, line 1799
UserController::index() - APP/controllers/user_controller.php, line 14
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 268
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 240
[main] - APP/webroot/index.php, line 84
CakePHP: the rapid development php framework
Missing View
Error: The view for UserController::index() was not found.

Error: Confirm you have created the file:
/var/www/http/eservice/app/views/user/index.ctp

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


4 queries took 217 ms Nr Query Error Affected Num. rows Took (ms)
1 ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'  0  4
2 SELECT view_name AS name FROM user_views UNION SELECT table_name AS name
FROM user_tables  13 13 133
3 SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM user_tab_columns WHERE
table_name = 'USERS'  9 9 56
4 SELECT User.id, User.email, User.password, User.question, User.answer,
User.modified_date, User.modified_by, User.failed_login_attempts,
User.locked FROM users User WHERE 1 = 1   0  24

--------------------

The table I am selecting is defined as:


CREATE TABLE CS_USERS
(
  ID                     INTEGER                NOT NULL,
  EMAIL                  VARCHAR2(250 BYTE)     NOT NULL,
  PASSWORD               VARCHAR2(250 BYTE)     NOT NULL,
  QUESTION               VARCHAR2(250 BYTE),
  ANSWER                 VARCHAR2(250 BYTE),
  MODIFIED_DATE          DATE,
  MODIFIED_BY            VARCHAR2(250 BYTE),
  FAILED_LOGIN_ATTEMPTS  INTEGER,
  LOCKED                 CHAR(1 BYTE)
);


ALTER TABLE CS_USERS ADD (
  PRIMARY KEY
 (ID));


and the model is defined as:

<?php
class User extends AppModel
{
        var $name = 'User';

        var $useTable = 'CS_USER';

        var $validate = array(

                        'email'         => VALID_EMAIL,
                                'password'      => VALID_NOT_EMPTY,
                        'question'      => VALID_NOT_EMPTY,
                        'password'      => VALID_NOT_EMPTY

                );


}
?>

This is so incredible simple, it should just work.  But for some reason
Cake is constructing SQL statements that Oracle just doesn't like.

Does anyone have any ideas as to what I need to do to fix this?  I've had
a ton of success with Cake and MySQL and unfortunately I'm being forced
into Oracle for this project.  If I cannot make this work for Oracle I'll
have to look at some other frameworks, which I definitely don't want to
do.

Thanks in advance!

Brian




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to