Bake made the query?
CREATE TABLE cakes
(
id integer NOT NULL DEFAULT nextval('cake_id_seq'::regclass),
user_id character(36) NOT NULL,
cakename character varying(255) NOT NULL,
created timestamp without time zone,
modified timestamp without time zone,
CONSTRAINT id1 PRIMARY KEY (id)
Thanks for trying to help me
Erik
On 24 Nov, 22:18, John Andersen <j.andersen...@gmail.com> wrote:
> What is the definition of your modified and created columns in the
> table?
> Who made the query (data), you or bake?
> Enjoy,
> John
>
> On 23 Nov., 20:33, Erik <ret...@gmail.com> wrote:> I am new to cakephp and have tried to install on Vista with WAPP from
> > bitnami. I succeeded in making it run, but is having problem with the
> > datatype for created and modified. Have tried all dateformat provided
> > by postgesql, but gets an error message. If I change to character var
> > it is OK, but then it is not timestamp.
>
> > This is the query:
> > Query: INSERT INTO "cakes" ("user_id", "cakename", "modified",
> > "created") VALUES ('4ceacf69-1bcc-4a43-93cb-0970a4d2bb16', 'testcake',
> > '\\x323031302d31312d3233', '\\x323031302d31312d3233')
>
> > and I get this two errormessages.
>
> > Warning (2): pg_query() [function.pg-query]: Query failed: ERROR:
> > invalid input syntax for type date: "\x323031302d31312d3233"
> > LINE 1: ...ceacf69-1bcc-4a43-93cb-0970a4d2bb16', 'testcake', '\
> > \x323031...
> > ^ [CORE
> > \cake\libs\model\datasources\dbo\dbo_postgres.php, line 167]
>
> > Warning (512): SQL Error: ERROR: invalid input syntax for type date:
> > "\x323031302d31312d3233"
> > LINE 1: ...ceacf69-1bcc-4a43-93cb-0970a4d2bb16', 'testcake', '\
> > \x323031...
> > ^ [CORE
> > \cake\libs\model\datasources\dbo_source.php, line 681]
>
> > I have searched at internet, but have not found any solution. I have
> > tried to insert data in the tables using phppgadmin. If i replace \
> > \x323031302d31312d3233 with '2011-12-11 21:12:11' it is stored
> > correctly.
>
> > I have used the bake functionality and have not written the php code
> > myself. Is it a common problem that cakephp and postgresql dows not
> > works wells together.
>
> > Erik
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment