[Maypole] create with sql-function values
forehead
forehead@4red.org
Sun, 2 May 2004 15:43:57 +0800
hi, maypole
here are two questions.
1. when I create the Class::DBI object , like this:
user->create({
username => $username,
password => $password,
create_on => 'now()'
});
here the create_on column is a 'datetime' one , the the value 'now()'
will not give the object right stuff what I expected. I browser the
Class::DBI source code and find that the value here given will pass as
$sth->execute(@values). so we can not use the database's method for more
convient use. so here must give the real date like '2004-05-04'.
any idea to give the convient solution when meet such situation£¿
2. the table data will map to perl class-object. sometimes i need the objects
orgnized as a tree( the data struct), which has parents and children, and when
delete one, it will delete the children. or other any data struct , any idea to
implement that for more convient , write a abstract tree class or a Class::DBI:Plugin ?
any good idea?
may the question more about the Class::DBI, but since maypole is almost use that modules
features and give the magic solution for web-based application, so I want more ideas about
how to meet the more complex situations.
thanks for any comments.
----------------------
forehead (Chun Sheng)
forehead@4red.org
2004-04-27