|
Post by Stockers on Nov 26, 2021 6:51:51 GMT -8
All working fine but receive a SQL database error 1068 at line 258 "Multiple Primary Key Defined". Looking at line 258, and after, there are multiple "Primary ID keys".
Any ideas to correct please?
|
|
|
Post by doxidad on Nov 26, 2021 14:51:40 GMT -8
Is this line 258 in WeatherSenseWireless.sql 258 ALTER TABLE `AS433MHZ` ADD PRIMARY KEY (`ID`); ?
If so, you don't need to execute the SQL script again. Once the database is built by the script, the database structure is created. If you run it again it will fail with that error since the primary key was created the first time it was run - you can only have one primary key on a table. If this was a purchased SD card, I would assume (might be wrong) that the database had already been created in the SD card image.
|
|
|
Post by stockers99 on Nov 28, 2021 8:10:30 GMT -8
Many thanks for that, and all understood. Yes, had run it a second time, hence the failure. Thank you.
|
|