Re: Re: DB_Table qf_type 'timestamp' cannot be escaped...

From: Date: Wed, 19 Apr 2006 09:30:05 +0000
Subject: Re: Re: DB_Table qf_type 'timestamp' cannot be escaped...
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23739@lists.php.net to get a copy of this message
Hi Mark, On 19 Apr 2006, at 10:37, Mark Wiesemann wrote:
before going deeper into your code, I recognized some errors in your table definition:
        'descr' => array(
            'type' => 'text',
            'qf_label'  => 'description',
            'qf_type'  => 'textarea'
        ),
There is no 'text' type in DB_Table. You might want to use 'clob'.
ok. thnx
        'enddate' => array(
            'type' => 'datetime',
            'qf_label'  => 'end date',
            'qf_type'  => 'timestamp',
        ),
        'created_at' => array(
            'type' => 'datetime',
            'qf_type'  => 'hidden'
        ),
        'updated_at' => array(
            'type' => 'datetime',
            'qf_type'  => 'hidden'
        )
'datetime' doesn't exist also. It has to be 'timestamp'. A list of all valid types can be found here: http://wiki.ciaweb.net/yawiki/index.php?area=DB_Table&page=DataTypes How can you work with DB_Table while these errors exist? Do you have something like the following in your code? <<< $c =& new Bet($db, 'test_charlie', 'safe'); if ($c->error) { die($c->error->getMessage()); }
I had this, but not exactly. So that would be the issue that I didn't see the errors.
The error check after the constructor is very important. Please correct the above mentioned errors and then test again. If the problem from your first report then still exists, then please mail me again. (Please mail me also if the problem is solved.)
Solved! It was the 'datetime' type in the DB_Table definition. Thank you Mark! Appreciate it big time!
I'm also interested whether the MDB2 fix in Table.php works as expected.
Gonna try that out now. Regards, - Charlie http://www.pear-forum.org
Regards, Mark


« previous php.pear.general (#23739) next »