I am setting up my database for my project and I am getting errors.I
probably have a lot wrong with the syntax because this is my first
complex database. Also, I know that this is not a well optimized
database. I am getting an error in the first few lines of each table
creation.
Here is the
I'm sure it is not, but I figured since I was designing my application
and cake does not provide a mapping system like sqlobject in python,
that some of the nice folks here may possibly be nice enough to see if
they can see the problem.
thanks,
jeremy
In cakephp, would it not be better to set up a multiple to multiple
relationship using an intermediate table? How well does cake deal with
that situation?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP
I am a tard is all. I realized that the index page was not
posts/view/index, it was posts/index. I changed the link to add a post
to posts/add and it worked.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP
I get a blank page for my add page in the blog tutorial. I have no idea
why. Here is the code:
h1Add Post/h1form method=post action=?php echo
$html-url('/posts/add')?p
Title:
?php echo $html-input('Post/title', array('size' = '40'))?
?php echo
The name of the table in my database is posts that is the case and
the plurality. The columns are exactly as follows:
id, title, body, created, modified
My model code is this:
from /models/post.php:
?php
class Post extends AppModel
{
var $name = 'Post';
}
?
My controller code is this:
The SQL was copied from the tutorial:
CREATE TABLE posts (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(50),
body TEXT,
created DATETIME DEFAULT NULL,
modified DATETIME DEFAULT NULL
);
INSERT INTO posts (title,body,created)
VALUES ('The title', 'This is the
I was following the blog tutorial and even went so far as to start over
and copy/paste the code to try to get it to work right. To no avail. I
keep getting an error:
No Database table for model Post (expected posts), create it first.
or if I play with the singular/plurals in the model I get:
Well, What else could it be? I copy and pasted everything from the
blog, the index page that comes with cakephp says I am connecting to
the database, I really do not know what else could be wrong except for
something in the code in the tutorial.
OK, I fixed the problem. I think the issue was the name of my model
file. It was post.php, and I renamed it as Post.php I now get the table
of the entries.
new problem though. I get warnings at the top of the page and I do not
understand what they mean:
Warning:
that did it thanks.
--~--~-~--~~~---~--~~
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
I was looking over the manual while I am also going over the blog
tutorial.
In the blog tutorial, the model is extremely simple, however, in the
manual the section on the model is extremely complex and covers a lot
of built in functions. Are all those functions for the model or are
they made
It does. My model classes are classes that relate to a table in my
database. I automatically get all those cool functions to use in my
controller for fetching and saving data, plus any other functions I
want to create, though most folks doing CRUD probably do not need to
create anything unless
I was looking over the portion of the manual that deals with the model
and the example given shows a model relating to a blog database. My
question is why do they implement the hid and unhide in the model and
not the controller? Shouldn't hide and unhide be a function that you
would want to put
14 matches
Mail list logo