DataObject Inserts and Sequences

From: Date: Wed, 25 Feb 2004 23:39:30 +0000
Subject: DataObject Inserts and Sequences
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10940@lists.php.net to get a copy of this message
hi, i have this simple code: $player_has_stats = new Player_has_stats(); $player_has_stats->player_id = 13; $player_has_stats->insert(); with debug enabled i get this: player_has_stats: CONNECT: USING CACHED CONNECTION player_has_stats: CONNECT: USING CACHED CONNECTION player_has_stats: QUERY: INSERT INTO player_has_stats (player_id ) VALUES ( 1 ) player_has_stats: query: QUERY DONE IN 0.000581979751587 seconds player_has_stats: 1: Clearing Cache for player_has_stats whats wrong here? why does it generate the sql statement with ...VALUES(1) ? i clearly said that player_id should be 13. CREATE TABLE player_has_stats ( player_id int(10) unsigned NOT NULL default '0', deaths int(10) unsigned NOT NULL default '0', kills int(10) unsigned NOT NULL default '0', PRIMARY KEY (player_id) ) TYPE=MyISAM; i'm using: $Id: DataObject.php,v 1.208 2004/01/29 09:53:18 alan_k Exp $ for some strange reason it tries to create a sequence for that table. i have absolut no idea why it tries todo that. please help. best regards, michael

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