Good idea, except I think I set the primary key columns to unsigned. Also, they have to be unique, so I cannot have more than one unassigned device, which would often be the case.
I may have to alter my schema but of course that cuts the total number of integers I have available in half. Not a big deal though. Bob S On Dec 14, 2016, at 18:58 , Mike Kerner <[email protected]<mailto:[email protected]>> wrote: I'd have to see your SQL, but how are you checking for null and empty? Null is a funky value in SQL that can mean a variety of things, and an empty value in an integer column will give you heartache. WIth many DBMS's, you have to check IS NULL or IS NOT NULL depending on the column values and types. See the syntax reference for the DBMS you are using. If I was in your position, 0 would be unassigned and -1 would be decommissioned, the column would be set to NOT NULL, and a trigger would set it to 0 if it IS NULL() for insert and for update. _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
