Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Proble with primary key + unique
Proble with primary key + unique [message #1463] Mon, 14 July 2008 15:01 Go to next message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
I found out that when importing this table to radicore and exporting to php:

CREATE TABLE IF NOT EXISTS `programa` (
	`programa_id` integer NOT NULL AUTO_INCREMENT,
	`entidad_id` integer NOT NULL ,
	`nombre` varchar(30) NOT NULL default '',

	PRIMARY KEY  (`programa_id`),
	UNIQUE KEY  (`entidad_id`,`nombre`),
	unique (`programa_id`)
) TYPE=MyISAM;


the .dict.inc file generated includes this code which gives an error:

    $this->unique_keys[]                    = array(,
                                                    'nombre');
Re: Proble with primary key + unique [message #1468 is a reply to message #1463] Mon, 14 July 2008 20:41 Go to previous message
AJM is currently offline  AJM
Messages: 2349
Registered: April 2006
Location: Surrey, UK
Senior Member
Yes, this is a bug - fix attached.

BTW, declaring 'programa_id' as both 'primary_key' and 'unique' is superfluous as a primay key is automatically unique.


Previous Topic: Fatal error: Cannot use string offset as an array in ...
Next Topic: Two fields not showing -Solved
Goto Forum:
  


Current Time: Tue May 07 14:05:40 EDT 2024

Total time taken to generate the page: 0.00999 seconds