Re: DB_Dataoabject

From: Date: Thu, 20 Nov 2003 13:45:55 +0000
Subject: Re: DB_Dataoabject
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-23774@lists.php.net to get a copy of this message
I forgot another important detail, the following is also in my script: $eventRows->selectAdd("UNIX_TIMESTAMP(start) AS start_stamp"); $eventRows->selectAdd("UNIX_TIMESTAMP(end) AS end_stamp"); HTH Jeroen Jeroen Houben wrote:
Alan Knowles wrote:
that shouldnt affect anything, as updates use the keys as the where condition (unless I forgot something :) can you give an example how it broke something?
I also went back to 1.2 because I got all these notices like: Notice: Undefined property: start_stamp in x on line 97 Notice: Undefined property: end_stamp in x on line 98 Notice: Undefined property: start_stamp in x on line 97 Notice: Undefined property: end_stamp in x on line 98 Notice: Undefined property: start_stamp in x on line 97 Notice: Undefined property: end_stamp in x on line 98 I realize that "end" and "start" are pretty bad names for database fields, so I should alter them, nevertheless this never caused any errors before.. This is my generated class: <?php /** * Table Definition for meet_events */ require_once 'DB/DataObject.php'; class DataObjects_Meet_events extends DB_DataObject { ###START_AUTOCODE /* the code below is auto generated do not remove the above tag */
   var $__table = 'meet_events';                     // table name
   var $eventID;                         // int(5)  not_null primary_key unsigned auto_increment
   var $owner;                           // string(15)  not_null
   var $name;                            // string(100)  not_null
   var $address;                         // string(150)  not_null
   var $city;                            // string(50)  not_null
   var $country;                         // string(3)  not_null
   var $start;                           // datetime(19)  not_null multiple_key
   var $end;                             // datetime(19)  not_null multiple_key
   var $project_url;                     // string(150)    var $agenda_url;                      // string(150)    var $status;                          // string(6)  not_null enum
/* ZE2 compatibility trick*/ function __clone() { return $this;} /* Static get */ function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_Meet_events',$k,$v); } /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE } ?>
Regards Alan Arnaud Limbourg wrote:
Quick note I noticed that in 1.3 changelog
     New Features
- Inserts and updates do not use keys in the data creation part of the query
(Markus Wolff) It sounds like BC to me (just found that out the hard way ;).


« previous php.pear.dev (#23774) next »