Hi all,

I've been investigating using cakePHP, but I'm running into some
problems with how I'm using.  Apparently, I must be missing something,
but being new to cakePHP, I don't know where to start.  I'm hoping you
all can point me in the right direction.

I tried building the blog tutorial and while I was able to get most of
it functional, I couldn't get "editing" posts to work.  No big deal I
thought, I'll just turn on scaffolding and take a look at the auto-
generated functions.  After updating the appropriate files, I can view
the data in the "posts" table just fine, but when I try to "view" the
items, I'm getting the error message below:

Query:
Warning: SQL Error: 1065: Query was empty in admin/cake_demo/cake/libs/
model/datasources/dbo_source.php on line 476

The controller dump is attached below.  Can someone give me some
insight into what the problem is?

Thanks,
Jeremy



Controller dump:

postscontroller Object
(
    [_log] =>
    [name] => posts
    [here] => /admin/cake_demo/posts/view/1/
    [webroot] => /admin/cake_demo/
    [action] => view
    [uses] =>
    [helpers] => Array
        (
            [0] => Html
            [1] => Form
        )

    [params] => Array
        (
            [pass] => Array
                (
                    [0] => 1
                )

            [controller] => posts
            [action] => view
            [form] => Array
                (
                )

            [url] => Array
                (
                    [url] => posts/view/1/
                )

            [file] => cake/libs/view/templates/scaffolds/view.thtml
            [viewClass] => View
            [model] => Post
        )

    [data] =>
    [viewPath] => posts
    [viewVars] => Array
        (
            [data] =>
            [fieldNames] => Array
                (
                    [id] => Array
                        (
                            [prompt] => Id
                            [tagName] => Post/id
                            [type] => hidden
                        )

                    [title] => Array
                        (
                            [prompt] => Title
                            [tagName] => Post/title
                            [required] => 1
                            [errorMsg] => Required Field
                            [type] => input
                        )

                    [body] => Array
                        (
                            [prompt] => Body
                            [tagName] => Post/body
                            [required] => 1
                            [errorMsg] => Required Field
                            [type] => area
                        )

                    [created] => Array
                        (
                            [prompt] => Created
                            [tagName] => Post/created
                            [selected] =>
                        )

                    [modified] => Array
                        (
                            [prompt] => Modified
                            [tagName] => Post/modified
                            [selected] =>
                        )

                )

        )

    [pageTitle] => Scaffold :: View :: Posts
    [modelNames] => Array
        (
            [0] => Post
            [1] => Post
        )

    [base] => /admin/cake_demo
    [layout] => default
    [autoRender] => 1
    [autoLayout] => 1
    [components] => Array
        (
            [0] => Session
        )

    [view] => View
    [ext] => .thtml
    [__viewClass] =>
    [output] =>
    [plugin] =>
    [cacheAction] =>
    [persistModel] =>
    [beforeFilter] =>
    [webservices] =>
    [scaffold] =>
    [modelClass] => Post
    [modelKey] => post
    [passed_args] => Array
        (
            [0] => 1
        )

    [passedArgs] => Array
        (
            [0] => 1
        )

    [Session] => sessioncomponent Object
        (
            [_log] =>
            [valid] => 1
            [error] =>
            [_userAgent] => 64892a71614760306f6c52f1cb727cca
            [path] => /admin/cake_demo/
            [lastError] =>
            [security] => high
            [time] => 1177708303
            [sessionTime] => 1177709503
            [watchKeys] => Array
                (
                )

            [__active] => 1
            [host] => www.bucksdd.com
            [cookieLifeTime] => 0
            [base] => /admin/cake_demo
            [webroot] => /admin/cake_demo/
            [here] => /admin/cake_demo/posts/view/1/
            [params] => Array
                (
                    [pass] => Array
                        (
                            [0] => 1
                        )

                    [controller] => posts
                    [action] => view
                    [form] => Array
                        (
                        )

                    [url] => Array
                        (
                            [url] => posts/view/1/
                        )

                    [bare] => 0
                    [webservices] =>
                    [plugin] =>
                )

            [action] => view
            [data] =>
            [plugin] =>
        )

    [Post] => post Object
        (
            [_log] =>
            [useDbConfig] => default
            [useTable] =>
            [displayField] => title
            [id] => 1
            [data] => Array
                (
                )

            [table] => posts
            [primaryKey] => id
            [_tableInfo] => set Object
                (
                    [_log] =>
                    [value] => Array
                        (
                            [0] => Array
                                (
                                    [name] => id
                                    [type] => integer
                                    [null] =>
                                    [default] =>
                                    [length] => 10
                                )

                            [1] => Array
                                (
                                    [name] => title
                                    [type] => string
                                    [null] => 1
                                    [default] =>
                                    [length] => 50
                                )

                            [2] => Array
                                (
                                    [name] => body
                                    [type] => text
                                    [null] => 1
                                    [default] =>
                                    [length] =>
                                )

                            [3] => Array
                                (
                                    [name] => created
                                    [type] => datetime
                                    [null] => 1
                                    [default] =>
                                    [length] =>
                                )

                            [4] => Array
                                (
                                    [name] => modified
                                    [type] => datetime
                                    [null] => 1
                                    [default] =>
                                    [length] =>
                                )

                        )

                )

            [validate] => Array
                (
                    [title] => /.+/
                    [body] => /.+/
                )

            [validationErrors] => Array
                (
                )

            [tablePrefix] =>
            [name] => Post
            [currentModel] => post
            [tableToModel] => Array
                (
                    [posts] => Post
                )

            [modelToTable] => Array
                (
                )

            [keyToTable] => Array
                (
                )

            [alias] => Array
                (
                )

            [logTransactions] =>
            [transactional] =>
            [cacheQueries] => 1
            [belongsTo] => Array
                (
                )

            [hasOne] => Array
                (
                )

            [hasMany] => Array
                (
                )

            [hasAndBelongsToMany] => Array
                (
                )

            [recursive] => 1
            [__associationKeys] => Array
                (
                    [belongsTo] => Array
                        (
                            [0] => className
                            [1] => foreignKey
                            [2] => conditions
                            [3] => fields
                            [4] => order
                            [5] => counterCache
                        )

                    [hasOne] => Array
                        (
                            [0] => className
                            [1] => foreignKey
                            [2] => conditions
                            [3] => fields
                            [4] => order
                            [5] => dependent
                        )

                    [hasMany] => Array
                        (
                            [0] => className
                            [1] => foreignKey
                            [2] => conditions
                            [3] => fields
                            [4] => order
                            [5] => limit
                            [6] => offset
                            [7] => dependent
                            [8] => exclusive
                            [9] => finderQuery
                            [10] => counterQuery
                        )

                    [hasAndBelongsToMany] => Array
                        (
                            [0] => className
                            [1] => joinTable
                            [2] => foreignKey
                            [3] => associationForeignKey
                            [4] => conditions
                            [5] => fields
                            [6] => order
                            [7] => limit
                            [8] => offset
                            [9] => unique
                            [10] => finderQuery
                            [11] => deleteQuery
                            [12] => insertQuery
                        )

                )

            [__associations] => Array
                (
                    [0] => belongsTo
                    [1] => hasOne
                    [2] => hasMany
                    [3] => hasAndBelongsToMany
                )

            [__insertID] =>
            [__numRows] =>
            [__affectedRows] =>
        )

)


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