delete from tbldesignoccassion where designId not in (select id from tbldesign);
delete from tbldesign_designtype where designId not in (select id from tbldesign);
** this is for when it says a designType is missing - it deletes the connected products to empty design types... I think :) **
delete from tbldesign_designtype where designTypeId not in (select id from tbldesigntype)
UPDATE tbldesign SET description = REPLACE(description, "'", "");
UPDATE `tbldesign` SET `availableTo` = '2029-06-02' WHERE `availableTo` = '0000-00-00';
UPDATE `tbldesign` SET `availableTo` = '2029-06-02' WHERE `availableTo` IS NULL and availableFrom IS NOT NULL;
UPDATE `tbldesign` SET `availableFrom` = '2000-06-02' WHERE `availableFrom` IS NULL and availableTo IS NOT NULL;
update tblpage set redirect="";