I have a table that has this layout in MySQL:
'CREATE TABLE `bread` (
`rundate` varchar(20) NOT NULL,
`runtime` varchar(20) NOT NULL,
`bread` int(11) DEFAULT NULL,
`lread` int(11) DEFAULT NULL,
`rcache` int(11) DEFAULT NULL,
`bwrit` int(11) DEFAULT NULL,
`lwrit` int(11) DEFAULT NULL,
`wcache` int(11) DEFAULT NULL,
`pread` int(11) DEFAULT NULL,
`pwrit` int(11) DEFAULT NULL,
PRIMARY KEY (`rundate`,`runtime`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1'
When I try to generate the app, I get this error message: Table 'bread' has too many primary keys. Only one primary key is allowed per table. Is there a way to use composite keys?
How do I work around this?
Thanks,
Tim
Composite keys
Re: Composite keys
Did you try to set one primary key in AppGini and do the rest in phpMyAdmin?
I mean something like what I did here:
http://forums.appgini.com/phpbb/viewtopic.php?f=4&t=814
I mean something like what I did here:
http://forums.appgini.com/phpbb/viewtopic.php?f=4&t=814
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper
Re: Composite keys
No, I hadn't done any experimenting like that yet.
There really aren't two primary keys, there is actually only one composite key (rundate, runtime). These two fields are required to make the unique index, but you got me thinking that I could make a single column (rundatetime) that I build before I put the data into the database and this would get me around the issue where AppGini thinks that I actually have two primary keys.
Thanks,
Tim
There really aren't two primary keys, there is actually only one composite key (rundate, runtime). These two fields are required to make the unique index, but you got me thinking that I could make a single column (rundatetime) that I build before I put the data into the database and this would get me around the issue where AppGini thinks that I actually have two primary keys.
Thanks,
Tim