Every SQL data table should have a auto incrementing Id in the primary key something like this in MySQL ToolID int NOT NULL AUTO_INCREMENT, You might also have a user editable Tool Number but this separates indexes used to create relationships with other tables from Human intervention.
Anytime I ignored this "rule" I ended up reworking stuff to include it later. Rod Webster *1300 896 832* +61 435 765 611 Vehicle Modifications Network www.vehiclemods.net.au On Sun, 19 Jun 2022 at 17:34, Håvard F. Aasen via Emc-developers < emc-developers@lists.sourceforge.net> wrote: > On 18.06.2022 01:47, andy pugh wrote: > > On Fri, 17 Jun 2022 at 17:07, Jose Luis <j.l.toledan...@gmail.com> > wrote: > > > >> Still need to figure the parts from linuxcnc like where i can get or put > >> the data. > > > > Dewey added an interface. I'll be honest and say that it isn't how I > > would have done it. But I didn't do it so.... > > > > https://linuxcnc.org/docs/devel/html/tooldatabase/tooldatabase.html > > > > I was looking at these tables, and beside that table names are written > in plural form, the tools table with entries > > toolID TEXT PRIMARY KEY, > T_number INTEGER, > > As this is described, it seems to me that toolID really is a description, > and T_number could be used as the primary key, like so > > toolID INTEGER PRIMARY KEY, -- alias T_number > description TEXT > > > Does this suggestion has any unintended side effect? Not completely sure > the reasoning behind the original table layout. > > > Håvard > > > _______________________________________________ > Emc-developers mailing list > Emc-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-developers > _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers