Index: trunk/kernel/include/item.php =================================================================== diff -u -r440 -r450 --- trunk/kernel/include/item.php (.../item.php) (revision 440) +++ trunk/kernel/include/item.php (.../item.php) (revision 450) @@ -778,15 +778,15 @@ // check if not exists $db =& $this->adodbConnection; - $sql = sprintf('SELECT * FROM %s WHERE CategoryId = %s AND ItemResourceId = %s', $SourceTable, $CatId, $this->Get("ResourceId")); + $sql = sprintf('SELECT * FROM %s WHERE CategoryId = %s AND ItemResourceId = %s', $SourceTable, (int)$CatId, $this->Get("ResourceId")); $rs = $db->Execute($sql); if (is_object($rs)) { if($rs->RecordCount() == 0 ) { - $sql = "INSERT INTO $SourceTable (CategoryId,ItemResourceId, PrimaryCat) VALUES ('$CatId','".$this->Get("ResourceId")."',$Primary)"; + $sql = "INSERT INTO $SourceTable (CategoryId,ItemResourceId, PrimaryCat) VALUES (".(int)$CatId.",'".$this->Get("ResourceId")."',$Primary)"; if($this->debuglevel) - echo $sql."
\n"; + echo $sql."
\n"; $this->adodbConnection->Execute($sql); } }