SELECT ujima_Inserts.RecordNum, ujima_Inserts.PageNum, ujima_Inserts.Frame, ujima_Inserts.Area, ujima_Inserts.Category, ujima_Inserts.CardNum, ujima_Inserts.CategoryNums, ujima_Inserts.CardNums, ujima_Inserts.NoSubstitution, ujima_Inserts.RandomItems, ujima_Inserts.RandomItemsDelimiter, ujima_Inserts.RandomItemsWeight, ujima_Inserts.InsertInterval, ujima_Inserts.CurrentCount, ujima_Inserts.TotalInserts, ujima_Inserts.PageTitle, ujima_Inserts.FormatData, ujima_Inserts.DataString, ujima_Inserts.Seq1, ujima_Inserts.Seq2, ujima_Inserts.Seq3, ujima_Inserts.ShowSequencing, ujima_Inserts.WithFrames, ujima_Inserts.WithUnauthorized, ujima_Inserts.AppendToPreviousBlock, ujima_Inserts.CommentsFormat FROM ujima_Inserts WHERE ujima_Inserts.SystemNum = 1 AND ujima_Inserts.SubSystemNum IN(1) AND ujima_Inserts.PageNum IN () AND ujima_Inserts.RelativeStartTime <= 631715620 AND ujima_Inserts.RelativeEndTime >= 631715620 AND (LanguageNum IS NULL OR LanguageNum = 1) AND ((AllMonths = 1) OR (AllMonths = 2 AND NOT `Jan`) OR (AllMonths = 3 AND `Jan`) ) AND ((AllDays = 1) OR (AllDays = 2 AND NOT Day7) OR (AllDays = 3 AND Day7) ) AND (Tue OR Tue1 ) AND ((AllHours = 1) OR (AllHours = 2 AND NOT Hour12) OR (AllHours = 3 AND Hour12)) AND ((AllMinutes = 1) OR (AllMinutes = 2 AND NOT Minute33) OR (AllMinutes = 3 AND Minute33)) AND (Guests OR AllUsers) AND (ScreenWidthAll OR ScreenWidth1024) AND ExternalUsers AND WebCrawlers < 2 AND (GalleryMode = 9 OR GalleryMode = 3) AND ujima_Inserts.RecordIsActive AND ujima_Inserts.Frame NOT IN('Top', 'Left', 'Center', 'Right', 'Bottom') AND InsertClass0 OR InsertClass1 ORDER BY Seq1, Seq2, Seq3, RecordNum