Re: DataObject Inserts and Sequences

From: Date: Thu, 26 Feb 2004 10:31:42 +0000
Subject: Re: DataObject Inserts and Sequences
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10953@lists.php.net to get a copy of this message
Justin Patrin wrote: > When you have a field set as a primary key, DB_DataObject won't allow > you to manually set it (I believe). to contradict your statement the really strange thing is: i'm doing almost the same with a different table. CREATE TABLE player_not_visited_sector ( player_id smallint(6) unsigned NOT NULL default '0', sector_id smallint(6) unsigned NOT NULL default '0', PRIMARY KEY (player_id,sector_id) ) TYPE=MyISAM; $player_not_visited_sector = new Player_not_visited_sector(); $player_not_visited_sector->player_id = 13; $player_not_visited_sector->sector_id = 100; $player_not_visited_sector->insert(); player_not_visited_sector: CONNECT: USING CACHED CONNECTION player_not_visited_sector: CONNECT: USING CACHED CONNECTION player_not_visited_sector: QUERY: INSERT INTO player_not_visited_sector (player_id , sector_id ) VALUES ( 13 , 100 ) player_not_visited_sector: query: QUERY DONE IN 0.000319004058838 seconds player_not_visited_sector: 1: Clearing Cache for player_not_visited_sector and it works! that drives me crazy. the only difference i can see here is that i fill all columns for that table. for the previous i just fill in the primary key. anyway it shouldn't make any difference. ALAN?!? be my saver! *g* -- Michael Kunze http://www.smrealms.de/ Thompson's Theorem: When the going gets weird, the weird turn pro.

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