View Single Post
  #15  
Old 06-24-2015, 12:32 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Alternatively, this would add all missing zone entries in the `grid` table so the code doesn't crash looking up the max(id) for them:

Code:
INSERT INTO `grid`
SELECT DISTINCT 0, `zoneidnumber`, 0, 0 FROM `zone` WHERE `zoneidnumber` NOT IN
(SELECT DISTINCT `zoneid` FROM `grid`);
Reply With Quote