Resort keyword order?

Is there any way to resort the order of keywords? I've added several, and I'd like to put them "back" in alphebetical order. Is there anyway to do this without retyping them? (Which would reassign the keywords through my library. Right?)

I found the file in iPhoto 2. It's in the Library.data, but it's all gibberish, and I mean serious gibberish.
The keywords are right at the bottom. I think it would be possible to tinker with them but if you do it's imperative that you make a cpy of the original first otherwise it'll resort to the default settings.
I'm not sure but I think iPhoto 2 was the last before iLife in which you're supposed to be able to drag and drop.

Similar Messages

  • Keyword Order Scrambled

    Hi, I habitually use keywords to categorize my photos and like the keywords to appear in a particular order, which I define when I'm allocating them to photos. However, when I later (e.g. days or weeks) view the photos, I find that the order of the keywords has spontaneously changed. They are not presented alphabetically, just in some chaotic order. Does anyone know why iPhoto 'decides' to scramble my preferred keyword order? I've checked iPhoto preferences and there is nothing about keyword order there. I could understand it if the order became alphabetical, but it's not; just random, and highly irritating.
    Brian Smale

    I'm seeing the same thing. I think is has something to do with the order in which the keyword was created in the first place. I created a new keyword, AAAAAAA, and added it along with a number of others to a photo without any keywords. Initially the keywords were in the order that I added them, alphabetically. After closing and reopening the library the AAAAAAA was last in order for that photo.
    Report it to Apple via http://www.apple.com/feedback/iphoto.html.
    OT

  • Keyword Order Changes in iPhoto

    I have a gallery of my artwork in iPhoto. I created keywords to describe / catalog my work. For each photo, I placed the description in order of (size, medium used, subject). When I close iPhoto and reopen it, all of the keywords are underneath my photos, but the order (size, medium used, subject) are in a totally different order. IS THERE A WAY TO MAKE MY KEYWORDS KEEP THEIR ORDER?

    No.
    Regards
    TD

  • Keyword order in Final Cut Server

    Hi there,
    I have a question about the order of keywords in Final Cut Server.  It seems that I can only search and bring back results for clips if the keywords are in the same order that I search for.
    For example, I have a clip with the keywords:
    weights gym
    So if I search
    weights gym in the search box, the clip appears.  But if I search
    gym weights
    the clip can't be found.
    What am I doing wrong?  Also, I'm not putting commas in between keywords, does this affect things at all?
    Thanks for your help.

    Hi Oliver,
    This documentation might help you out:
    http://documentation.apple.com/en/finalcutserver/usermanual/index.html#chapter=4 %26section=2%26tasks=true
    ~D

  • Keyword Order Changes

    I have a gallery of my artwork in iPhoto. I created keywords to describe / catalog my work. For each photo, I placed the description in order of (size, medium used, subject). When I close iPhoto and reopen it, all of the keywords are underneath my photos, but the order (size, medium used, subject) are in a totally different order. IS THERE A WAY TO MAKE MY KEYWORDS KEEP THEIR ORDER?

    The keywords are sorted in the order that they are added to iPhoto. Send a feature request to Apple via via http://www.apple.com/feedback/iphoto.html.

  • Keywords order Aperture

    My keywords are in alphabetical order but somehow there is a second list of the keywords used while importing the images in Aperture. Is it possible to get one list in alphabetical order?
    iMac   Mac OS X (10.4.2)  

    If the keywords that are imported (in the <Imported Keyword> list) are as you would like to keep them (no rekeywording needed), then you can merge the lists by dragging the keywords from the imported list to wherever they belong. Aperture will give you a dialog and you can accept the mege.
    You can avoid the extra list entirely if you remember to unlock the keyword HUD before you import.
    Also, you can force Aperture to sort the displayed keyword HUD by simply pressing shift H to close it and shift H to open it.
    iMac G5 rev B   Mac OS X (10.4.8)   Aperture articles > http://homepage.mac.com/bagelturf/index.html

  • Order is getting Syntax Error ????

    I am receiving and error message regarding syntax of the ORDER command. I have attached the code, error message and DDLs for the tables.
    select COALESCE(a.[Material],b.[Part_Number],c.[Part_Number])                 AS [Material],
    COALESCE(a.[Description],b.[Description],c.[Description])                     AS [Description],
    COALESCE(a.[LD],b.[LD],c.[LD])                                                AS [LD],
    COALESCE(a.[SalesOrder],b.[SalesOrder],c.[SalesOrder])                        As [SalesOrder],
    COALESCE(a.[Ln],b.[Ln],c.[Ln])                                                As [Ln],
    COALESCE(a.[S/J],b.[S/J],c.[S/J])                                             As [Type],
    COALESCE(a.[Job],b.[Job],c.[Job])                                             AS [Job], 
    COALESCE(a.[SalesCode],b.[SalesCode],c.[SalesCode])                           As [SalesCode],
    COALESCE(a.[OpenQty],0) + COALESCE(b.[OpenQty],0) + COALESCE(c.[OpenQty],0)   As [OpenQty],
    COALESCE(a.[OrderDate],b.[OrderDate],c.[OrderDate])                           As [OrderDate],
    (Case when b.[PromDate] = '1900-01-01' then '' else a.[PromDate] end)         As [PromDate],
    SUBSTRING(ISNULL(c.[WorkCenter],''),4,11)                                     AS [WorkCenter]
    from
    Select a.Material                                                             As [Material]
           ,Ma.Description                                                        As [Description]
           ,Ma.Lead_Days                                                          As [LD]
           ,a.Sales_Order                                                         As [SalesOrder]
           ,a.SO_Line                                                             As [Ln]
           ,'S'                                                                  
    As [S/J]
           ,a.Job                                                                
    As [Job]
           ,a.Sales_Code                                                          AS [SalesCode]
           ,Sum(a.Order_Qty - a.Picked_Qty - a.Shipped_Qty)                       AS [OpenQty]
           ,Cast(SH.Order_Date As Date)                                           AS [OrderDate]
           ,Cast(a.Promised_Date As Date)                                         AS [PromDate]
     As [WorkCenter]
           from [PRODUCTION].dbo.SO_Detail as a
    inner join [PRODUCTION].dbo.Material As Ma
          on a.Material = Ma.Material 
    inner join [PRODUCTION].dbo.SO_Header As SH
          on a.Sales_Order = SH.Sales_Order
    Where (a.Status = 'Open' or a.Status = 'Backorder') 
    and a.Job <> ''
    and (a.Order_Qty - a.Picked_Qty - a.Shipped_Qty > 0)
    GROUP BY a.Material, a.Job, [S-J], Ma.Sales_Code, Ma.Lead_Days, SH.Order_Date, a.Promised_Date, Ma.Description, a.Sales_Order, a.SO_Line/JBSettings, -J
    )a
    full join
    Select b.Part_Number                                                          As [Part_Number]
           ,ISNULL(b.Description,'')                                              As [Description]
           ,Mb.Lead_Days                                                          As [LD]
           ,'00000'                                                               As [SalesOrder]
     As [Ln]
           ,'J'                                                                  
    As [S/J]
           ,b.Job                                                                
    As [Job]
           ,Mb.Sales_Code                                                         As [SalesCode]
           ,Sum(b.Order_Quantity - b.Shipped_Quantity)                            As [OpenQty]
           ,Cast(b.Order_Date As Date)                                            As [OrderDate]
     As [PromDate] 
     As [WorkCenter] 
    from [PRODUCTION].dbo.Job As b
    left outer join [PRODUCTION].dbo.Material As Mb
          on b.Part_Number = Mb.Material
    Where b.Status = 'Active' and Mb.Type = 'F' and b.Job Not like '%MASTER%' and b.Customer IS null
    GROUP BY b.Part_Number, b.Job, [S-J], Mb.Sales_Code, Mb.Lead_Days, b.Order_Date, b.Description
    )b
    full join
    Select c.Part_Number                                                          As [Part_Number]
           ,ISNULL(c.Description,'')                                              As [Description]
           ,Mc.Lead_Days                                                          As [LD]
           ,'00000'                                                               As [SalesOrder]
     As [Ln]
           ,'J'                                                                  
    As [S/J]
           ,c.Job                                                                
    As [Job]
           ,Mc.Sales_Code                                                         As [SalesCode]
           ,'0'                                                                  
    As [OpenQty]
           ,Cast(c.Order_Date As Date)                                            As [OrderDate]
     As [PromDate]  
           ,Max(Case when JO.Work_Center = 'INSPECTION'                                         and JO.Status = 'O'        
                   then '00 NOT STARTED'
                     when JO.Work_Center = 'INSPECTION'                                         and JO.Status = 'S'
                           then '90 INSPECTION'
                     when JO.Work_Center = 'INSPECTION'                                         and JO.Status = 'C'
                           then '95 COMPLETED'
                     When JO.Work_Center like '%WELD%'                                          and JO.Status =
    'O'                        then '05 NOT STARTED'
                     when JO.Work_Center like '%WELD%'                                          and JO.Status =
    'S'                        then '70 WELD'
                     when JO.Work_Center like '%WELD%'                                          and JO.Status =
    'C'                        then '75 WELD'
                     when JO.Work_Center = 'KITTING'                                            and JO.Status
    = 'O'                        then '05 NOT STARTED'
                     when JO.Work_Center = 'KITTING'                                            and JO.Status
    = 'S'                        then '60 KITTING'
                     when JO.Work_Center = 'KITTING'                                            and JO.Status
    = 'C'                        then '65 KITTED'
                     when JO.Work_Center = 'WIREBENDER'                                         and JO.Status = 'O'
                           then '15 NOT STARTED'
                     when JO.Work_Center = 'WIREBENDER'                                         and JO.Status = 'S'
                           then '50 WIRE BENDING'
                     when JO.Work_Center = 'WIREBENDER'                                         and JO.Status = 'C'
                           then '55 WIRE BENT'
                     when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'BEND TUBES' and JO.Status = 'O'                        then '20 NOT STARTED'
                     when JO.WOrk_Center = 'TUBEBENDER' and JO.Operation_Service = 'BEND TUBES' and JO.Status = 'S'                        then '40 BENDING
    TUBES'
                     when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'BEND TUBES' and JO.Status = 'C'                        then '45 TUBES BENT'
                     when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'CUT TUBES'  and JO.Status = 'O'                        then '25 NOT
    STARTED'
                     when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'CUT TUBES'  and JO.Status = 'S'                        then '30 CUTTING
    TUBES'
                     when JO.Work_Center = 'TUBEBEnder' and JO.Operation_Service = 'CUT TUBES'  and JO.Status = 'C'                        then '35 TUBES
    CUT'
           else '' end) [WorkCenter]
    from [PRODUCTION].dbo.Job_Operation As JO
    left outer join [PRODUCTION].dbo.Job as c
          on c.Job = JO.Job
    left outer join [PRODUCTION].dbo.Material As Mc
          on c.Part_Number = Mc.Material
    Where c.Status = 'Active' and Mc.Type = 'F' and c.Job Not like '%MASTER%' and c.Customer IS null
    GROUP BY c.Part_Number, c.Job, [S/J], Mc.SalesCode, Mc.Lead_Days, c.Order_Date, c.Description
    )c
    on a.[Material] = b.[Part_Number] and a.[Material] = c.[Part_Number] and a.[Job] = b.[Job] and a.[Job] = c.[Job] and a.[PromDate] = b.[PromDate] and a.[PromDate] = c.[PromDate]
    Order by COALESCE(b.[Part_Number],a.[Material],c.[Part_Number],b.[Job],a.[Job],c.[Job],b.[S/J],a.[S/J],c.[S/J])
    ERROR MESSAGE **********************************************************************************************
    Msg 156, Level 15, State 1, Line 99
    Incorrect syntax near the keyword 'Order'.
    DDL SO_DETAIL *********************************************************************************************
    USE [PRODUCTION]
    GO
    /****** Object:  Table [dbo].[SO_Detail]    Script Date: 05/22/2014 11:41:09 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[SO_Detail](
    [SO_DetailKey] [dbo].[KeyNum] IDENTITY(1,1) NOT NULL,
    [SO_Detail] [dbo].[KeyNum] NULL,
    [Sales_Order] [dbo].[Key10] NOT NULL,
    [SO_Line] [dbo].[T_6] NOT NULL,
    [PO] [dbo].[Key8] NULL,
    [Line] [dbo].[T_6] NULL,
    [Material] [dbo].[T_30] NULL,
    [Ship_To] [int] NULL,
    [Drop_Ship] [bit] NOT NULL,
    [Quote] [varchar](50) NULL,
    [Job] [dbo].[Key10] NULL,
    [Status] [dbo].[T_9] NOT NULL,
    [Make_Buy] [dbo].[T_1] NOT NULL,
    [Unit_Price] [float] NOT NULL,
    [Discount_Pct] [float] NOT NULL,
    [Price_UofM] [dbo].[UofM] NOT NULL,
    [Total_Price] [money] NOT NULL,
    [Deferred_Qty] [float] NOT NULL,
    [Prepaid_Amt] [money] NOT NULL,
    [Unit_Cost] [float] NOT NULL,
    [Order_Qty] [float] NOT NULL,
    [Stock_UofM] [dbo].[UofM] NOT NULL,
    [Backorder_Qty] [float] NOT NULL,
    [Picked_Qty] [float] NOT NULL,
    [Shipped_Qty] [float] NOT NULL,
    [Returned_Qty] [float] NOT NULL,
    [Certs_Required] [bit] NOT NULL,
    [Taxable] [bit] NOT NULL,
    [Commissionable] [bit] NOT NULL,
    [Commission_Pct] [float] NOT NULL,
    [Sales_Code] [dbo].[T_UCode] NULL,
    [Note_Text] [text] NULL,
    [Promised_Date] [datetime] NULL,
    [Last_Updated] [datetime] NOT NULL,
    [Description] [dbo].[T_30] NULL,
    [Price_Unit_Conv] [float] NULL,
    [Rev] [dbo].[T_8] NULL,
    [Tax_Code] [dbo].[T_15] NULL,
    [Ext_Description] [text] NULL,
    [Cost_UofM] [dbo].[T_4] NULL,
    [Cost_Unit_Conv] [float] NULL,
    [Res_Type] [smallint] NULL,
    [Res_ID] [dbo].[T_50] NULL,
    [Res_Qty] [float] NULL,
    [Partial_Res] [bit] NULL,
    [Prepaid_Trade_Amt] [money] NULL,
    [ObjectID] [uniqueidentifier] NOT NULL,
     CONSTRAINT [PK_SO_Detail] PRIMARY KEY NONCLUSTERED 
    [SO_DetailKey] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    ALTER TABLE [dbo].[SO_Detail]  WITH NOCHECK ADD  CONSTRAINT [FK_SOH_on_SODetl] FOREIGN KEY([Sales_Order])
    REFERENCES [dbo].[SO_Header] ([Sales_Order])
    ON DELETE CASCADE
    GO
    ALTER TABLE [dbo].[SO_Detail] NOCHECK CONSTRAINT [FK_SOH_on_SODetl]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Drop_Ship]  DEFAULT ((0)) FOR [Drop_Ship]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Status]  DEFAULT ('Open') FOR [Status]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Make_Buy]  DEFAULT ('M') FOR [Make_Buy]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Discount_Pct]  DEFAULT ((0)) FOR [Discount_Pct]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Price_UofM]  DEFAULT ('ea') FOR [Price_UofM]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Deferred_Qty]  DEFAULT ((0)) FOR [Deferred_Qty]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Prepaid_Amt]  DEFAULT ((0)) FOR [Prepaid_Amt]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Order_Qty]  DEFAULT ((0)) FOR [Order_Qty]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Backorder_Qty]  DEFAULT ((0)) FOR [Backorder_Qty]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Picked_Qty]  DEFAULT ((0)) FOR [Picked_Qty]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Certs_Required]  DEFAULT ((0)) FOR [Certs_Required]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Taxable]  DEFAULT ((0)) FOR [Taxable]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Commissionable]  DEFAULT ((0)) FOR [Commissionable]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Commission_Pct]  DEFAULT ((0)) FOR [Commission_Pct]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SODetail_PriceUofM]  DEFAULT ((1)) FOR [Price_Unit_Conv]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  DEFAULT ((0)) FOR [Prepaid_Trade_Amt]
    GO
    DDL Material ************************************************************************************************************************************
    USE [PRODUCTION]
    GO
    /****** Object:  Table [dbo].[Material]    Script Date: 05/22/2014 11:42:02 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[Material](
    [Material] [dbo].[Key30] NOT NULL,
    [Primary_Vendor] [dbo].[Key10] NULL,
    [User_Values] [dbo].[KeyNum] NULL,
    [Shape] [dbo].[Key10] NULL,
    [Location_ID] [dbo].[Key10] NOT NULL,
    [Sales_Code] [dbo].[T_15] NULL,
    [Description] [dbo].[T_30] NULL,
    [Type] [dbo].[T_1] NOT NULL,
    [Status] [dbo].[T_8] NOT NULL,
    [Pick_Buy_Indicator] [dbo].[T_1] NOT NULL,
    [Class] [varchar](10) NULL,
    [Rev] [dbo].[T_8] NULL,
    [Stocked_UofM] [dbo].[UofM] NOT NULL,
    [Purchase_UofM] [dbo].[UofM] NOT NULL,
    [Cost_UofM] [dbo].[UofM] NOT NULL,
    [Price_UofM] [dbo].[UofM] NOT NULL,
    [Selling_Price] [float] NULL,
    [Standard_Cost] [float] NOT NULL,
    [Average_Cost] [float] NULL,
    [Last_Cost] [float] NULL,
    [On_Order_Qty] [float] NULL,
    [Order_Point] [float] NULL,
    [Reorder_Qty] [float] NOT NULL,
    [Lead_Days] [smallint] NOT NULL,
    [UofM_Conv_Factor] [float] NOT NULL,
    [Lot_Trace] [bit] NOT NULL,
    [Rd_Whole_Unit] [bit] NOT NULL,
    [Ext_Description] [text] NULL,
    [Make_Buy] [dbo].[T_1] NOT NULL,
    [Vendor_Reference] [dbo].[T_30] NULL,
    [Drawing] [varchar](30) NULL,
    [Use_Price_Breaks] [bit] NOT NULL,
    [Note_Text] [text] NULL,
    [Last_Updated] [datetime] NOT NULL,
    [GL_Account] [dbo].[T_100] NULL,
    [Price_Unit_Conv] [float] NULL,
    [Holder_ID] [dbo].[T_50] NULL,
    [Job] [dbo].[T_10] NULL,
    [Tax_Code] [dbo].[T_15] NULL,
    [Taxable] [bit] NULL,
    [IS_Length] [float] NULL,
    [IS_Width] [float] NULL,
    [IS_Weight_Factor] [float] NULL,
    [IS_Thickness] [float] NULL,
    [Stock_Item] [dbo].[T_50] NULL,
    [Affects_Schedule] [bit] NULL,
    [ObjectID] [uniqueidentifier] NOT NULL,
    [Shape_OID] [uniqueidentifier] NULL,
    [Tooling] [bit] NULL,
    [IsSerialized] [bit] NOT NULL,
    [MaxUsage] [int] NULL,
    [ShelfLife] [float] NULL,
    [ShelfLifeUofM] [varchar](10) NULL,
     CONSTRAINT [PK_Material] PRIMARY KEY NONCLUSTERED 
    [Material] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_Loc_on_Matl] FOREIGN KEY([Location_ID])
    REFERENCES [dbo].[Location] ([Location_ID])
    GO
    ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_Loc_on_Matl]
    GO
    ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_Shap_on_Matl] FOREIGN KEY([Shape])
    REFERENCES [dbo].[Shapes] ([Shape])
    GO
    ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_Shap_on_Matl]
    GO
    ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_UVal_on_Matl] FOREIGN KEY([User_Values])
    REFERENCES [dbo].[User_Values] ([User_Values])
    GO
    ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_UVal_on_Matl]
    GO
    ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_Vend_on_Matl] FOREIGN KEY([Primary_Vendor])
    REFERENCES [dbo].[Vendor] ([Vendor])
    GO
    ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_Vend_on_Matl]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Selling_Price]  DEFAULT ((0)) FOR [Selling_Price]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Standard_Cost]  DEFAULT ((0)) FOR [Standard_Cost]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Average_Cost]  DEFAULT ((0)) FOR [Average_Cost]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Last_Cost]  DEFAULT ((0)) FOR [Last_Cost]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_On_Order_Qty]  DEFAULT ((0)) FOR [On_Order_Qty]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Order_Point]  DEFAULT ((0)) FOR [Order_Point]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Reorder_Qty]  DEFAULT ((0)) FOR [Reorder_Qty]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Lead_Days]  DEFAULT ((0)) FOR [Lead_Days]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_UofM_Conv_Factor]  DEFAULT ((0)) FOR [UofM_Conv_Factor]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Lot_Trace]  DEFAULT ((0)) FOR [Lot_Trace]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Rd_Whole_Unit]  DEFAULT ((0)) FOR [Rd_Whole_Unit]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Use_Price_Break]  DEFAULT ((0)) FOR [Use_Price_Breaks]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_PriceUofM]  DEFAULT ((1)) FOR [Price_Unit_Conv]
    GO
    ALTER TABLE [dbo].[Material] ADD  DEFAULT ((0)) FOR [IsSerialized]
    GO
    ALTER TABLE [dbo].[Material] ADD  DEFAULT ((0)) FOR [MaxUsage]
    GO
    ALTER TABLE [dbo].[Material] ADD  DEFAULT ((0)) FOR [ShelfLife]
    GO
    DDL SO_HEADER ***************************************************************************************************************
    USE [PRODUCTION]
    GO
    /****** Object:  Table [dbo].[SO_Header]    Script Date: 05/22/2014 11:43:29 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[SO_Header](
    [Sales_Order] [dbo].[Key10] NOT NULL,
    [Customer] [dbo].[Key10] NOT NULL,
    [Ship_To] [dbo].[KeyNum] NULL,
    [Contact] [dbo].[KeyNum] NULL,
    [Sales_Rep] [dbo].[Key6] NULL,
    [Order_Taken_By] [dbo].[Key6] NULL,
    [Ship_Via] [dbo].[T_UCode] NULL,
    [Tax_Code] [dbo].[T_UCode] NULL,
    [Terms] [dbo].[T_UCode] NULL,
    [Sales_Tax_Amt] [money] NOT NULL,
    [Sales_Tax_Rate] [float] NOT NULL,
    [Order_Date] [datetime] NOT NULL,
    [Promised_Date] [datetime] NULL,
    [Customer_PO] [dbo].[T_20] NULL,
    [Status] [dbo].[T_8] NOT NULL,
    [Total_Price] [money] NOT NULL,
    [Currency_Conv_Rate] [float] NOT NULL,
    [Trade_Currency] [dbo].[KeyNum] NULL,
    [Fixed_Rate] [bit] NOT NULL,
    [Trade_Date] [datetime] NULL,
    [Note_Text] [text] NULL,
    [Comment] [text] NULL,
    [Last_Updated] [datetime] NOT NULL,
    [User_Values] [int] NULL,
    [Source] [dbo].[T_20] NULL,
    [Prepaid_Tax_Amount] [money] NULL,
     CONSTRAINT [PK_SO_Header] PRIMARY KEY NONCLUSTERED 
    [Sales_Order] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Sales_Tax_Amt]  DEFAULT ((0)) FOR [Sales_Tax_Amt]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Sales_Tax_Rate]  DEFAULT ((0)) FOR [Sales_Tax_Rate]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Total_Price]  DEFAULT ((0)) FOR [Total_Price]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Currency_Conv_Rate]  DEFAULT ((1)) FOR [Currency_Conv_Rate]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Fixed_Rate]  DEFAULT ((1)) FOR [Fixed_Rate]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  DEFAULT ((0)) FOR [Prepaid_Tax_Amount]
    GO
    DDL JOB *******************************************************************************************************************************
    USE [PRODUCTION]
    GO
    /****** Object:  Table [dbo].[Job]    Script Date: 05/22/2014 11:44:43 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[Job](
    [Job] [dbo].[Key10] NOT NULL,
    [Sales_Rep] [dbo].[Key6] NULL,
    [Customer] [dbo].[Key10] NULL,
    [Ship_To] [dbo].[KeyNum] NULL,
    [User_Values] [dbo].[KeyNum] NULL,
    [Quote] [dbo].[Key10] NULL,
    [Contact] [dbo].[KeyNum] NULL,
    [Ship_Via] [dbo].[T_15] NULL,
    [Terms] [dbo].[T_15] NULL,
    [Tax_Code] [dbo].[T_15] NULL,
    [Sales_Code] [dbo].[T_15] NULL,
    [Top_Lvl_Job] [dbo].[T_10] NULL,
    [Type] [dbo].[T_8] NOT NULL,
    [Order_Date] [datetime] NOT NULL,
    [Status] [dbo].[T_8] NOT NULL,
    [Status_Date] [datetime] NOT NULL,
    [Part_Number] [dbo].[T_30] NULL,
    [Rev] [dbo].[T_10] NULL,
    [Description] [dbo].[T_30] NULL,
    [Ext_Description] [text] NULL,
    [Drawing] [varchar](30) NULL,
    [Build_To_Stock] [bit] NOT NULL,
    [Order_Quantity] [int] NOT NULL,
    [Extra_Quantity] [int] NULL,
    [Pick_Quantity] [int] NULL,
    [Make_Quantity] [int] NOT NULL,
    [Split_Quantity] [int] NULL,
    [Completed_Quantity] [int] NULL,
    [Shipped_Quantity] [int] NULL,
    [FG_Transfer_Qty] [int] NULL,
    [Returned_Quantity] [int] NULL,
    [In_Production_Quantity] [int] NOT NULL,
    [Assembly_Level] [smallint] NULL,
    [Certs_Required] [bit] NOT NULL,
    [Time_And_Materials] [bit] NOT NULL,
    [Open_Operations] [smallint] NULL,
    [Scrap_Pct] [float] NOT NULL,
    [Est_Scrap_Qty] [int] NULL,
    [Est_Rem_Hrs] [float] NULL,
    [Est_Total_Hrs] [float] NULL,
    [Est_Labor] [money] NULL,
    [Est_Material] [money] NULL,
    [Est_Service] [money] NULL,
    [Est_Labor_Burden] [money] NULL,
    [Est_Machine_Burden] [money] NULL,
    [Est_GA_Burden] [money] NULL,
    [Act_Revenue] [money] NULL,
    [Act_Scrap_Quantity] [int] NULL,
    [Act_Total_Hrs] [float] NULL,
    [Act_Labor] [money] NULL,
    [Act_Material] [money] NULL,
    [Act_Service] [money] NULL,
    [Act_Labor_Burden] [money] NULL,
    [Act_Machine_Burden] [money] NULL,
    [Act_GA_Burden] [money] NULL,
    [Priority] [smallint] NULL,
    [Unit_Price] [float] NULL,
    [Total_Price] [money] NULL,
    [Price_UofM] [dbo].[T_4] NULL,
    [Currency_Conv_Rate] [float] NOT NULL,
    [Trade_Currency] [dbo].[KeyNum] NULL,
    [Fixed_Rate] [bit] NOT NULL,
    [Trade_Date] [datetime] NULL,
    [Commission_Pct] [float] NULL,
    [Customer_PO] [dbo].[T_20] NULL,
    [Customer_PO_LN] [dbo].[T_6] NULL,
    [Sched_End] [datetime] NULL,
    [Sched_Start] [datetime] NULL,
    [Quantity_Per] [float] NULL,
    [Profit_Pct] [float] NULL,
    [Labor_Markup_Pct] [float] NOT NULL,
    [Mat_Markup_Pct] [float] NOT NULL,
    [Serv_Markup_Pct] [float] NOT NULL,
    [Labor_Burden_Markup_Pct] [float] NOT NULL,
    [Machine_Burden_Markup_Pct] [float] NOT NULL,
    [GA_Burden_Markup_Pct] [float] NOT NULL,
    [Lead_Days] [smallint] NULL,
    [Profit_Markup] [dbo].[T_1] NULL,
    [Prepaid_Amt] [money] NULL,
    [Split_To_Job] [bit] NOT NULL,
    [Note_Text] [text] NULL,
    [Comment] [text] NULL,
    [Last_Updated] [datetime] NOT NULL,
    [Order_Unit] [dbo].[T_4] NULL,
    [Price_Unit_Conv] [float] NULL,
    [Holder_ID] [dbo].[T_50] NULL,
    [Source] [dbo].[T_20] NULL,
    [Order_Taken_By] [dbo].[T_50] NULL,
    [Plan_Modified] [bit] NULL,
    [ObjectID] [uniqueidentifier] NOT NULL,
    [Released_Date] [datetime] NULL,
    [Prepaid_Tax_Amount] [money] NULL,
    [Prepaid_Trade_Amt] [money] NULL,
    [Last_Updated_By] [dbo].[T_50] NULL,
     CONSTRAINT [PK_Job] PRIMARY KEY NONCLUSTERED 
    [Job] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_Addr_on_Job] FOREIGN KEY([Ship_To])
    REFERENCES [dbo].[Address] ([Address])
    GO
    ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_Addr_on_Job]
    GO
    ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_Cust_on_Job] FOREIGN KEY([Customer])
    REFERENCES [dbo].[Customer] ([Customer])
    GO
    ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_Cust_on_Job]
    GO
    ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_Empl_on_Job] FOREIGN KEY([Sales_Rep])
    REFERENCES [dbo].[Employee] ([Employee])
    GO
    ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_Empl_on_Job]
    GO
    ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_UVal_on_Job] FOREIGN KEY([User_Values])
    REFERENCES [dbo].[User_Values] ([User_Values])
    GO
    ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_UVal_on_Job]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Build_To_Stock]  DEFAULT ((0)) FOR [Build_To_Stock]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Order_Quantity]  DEFAULT ((0)) FOR [Order_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Extra_Quantity]  DEFAULT ((0)) FOR [Extra_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Pick_Quantity]  DEFAULT ((0)) FOR [Pick_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Make_Quantity]  DEFAULT ((0)) FOR [Make_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Split_Quantity]  DEFAULT ((0)) FOR [Split_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Completed_Quantity]  DEFAULT ((0)) FOR [Completed_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Shipped_Quantity]  DEFAULT ((0)) FOR [Shipped_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_FG_Transfer_Qty]  DEFAULT ((0)) FOR [FG_Transfer_Qty]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Returned_Quantity]  DEFAULT ((0)) FOR [Returned_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_In_Production_Quantity]  DEFAULT ((0)) FOR [In_Production_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Assembly_Level]  DEFAULT ((0)) FOR [Assembly_Level]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Certs_Required]  DEFAULT ((0)) FOR [Certs_Required]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Time_And_Materials]  DEFAULT ((0)) FOR [Time_And_Materials]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Open_Operations]  DEFAULT ((0)) FOR [Open_Operations]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Scrap_Pct]  DEFAULT ((0)) FOR [Scrap_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Scrap_Qty]  DEFAULT ((0)) FOR [Est_Scrap_Qty]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Rem_Hrs]  DEFAULT ((0)) FOR [Est_Rem_Hrs]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Total_Hrs]  DEFAULT ((0)) FOR [Est_Total_Hrs]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Labor]  DEFAULT ((0)) FOR [Est_Labor]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Material]  DEFAULT ((0)) FOR [Est_Material]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Service]  DEFAULT ((0)) FOR [Est_Service]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Labor_Burden]  DEFAULT ((0)) FOR [Est_Labor_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Machine_Burden]  DEFAULT ((0)) FOR [Est_Machine_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_GA_Burden]  DEFAULT ((0)) FOR [Est_GA_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Revenue]  DEFAULT ((0)) FOR [Act_Revenue]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Scrap_Quantity]  DEFAULT ((0)) FOR [Act_Scrap_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Total_Hrs]  DEFAULT ((0)) FOR [Act_Total_Hrs]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Labor]  DEFAULT ((0)) FOR [Act_Labor]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Material]  DEFAULT ((0)) FOR [Act_Material]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Service]  DEFAULT ((0)) FOR [Act_Service]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Labor_Burden]  DEFAULT ((0)) FOR [Act_Labor_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Machine_Burden]  DEFAULT ((0)) FOR [Act_Machine_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_GA_Burden]  DEFAULT ((0)) FOR [Act_GA_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Priority]  DEFAULT ((5)) FOR [Priority]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Unit_Price]  DEFAULT ((0)) FOR [Unit_Price]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Total_Price]  DEFAULT ((0)) FOR [Total_Price]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Currency_Conv_Rate]  DEFAULT ((1)) FOR [Currency_Conv_Rate]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Fixed_Rate]  DEFAULT ((1)) FOR [Fixed_Rate]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Commission_Pct]  DEFAULT ((0)) FOR [Commission_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Quantity_Per]  DEFAULT ((1)) FOR [Quantity_Per]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Profit_Pct]  DEFAULT ((0)) FOR [Profit_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Labor_Markup_Pct]  DEFAULT ((0)) FOR [Labor_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Mat_Markup_Pct]  DEFAULT ((0)) FOR [Mat_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Serv_Markup_Pct]  DEFAULT ((0)) FOR [Serv_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Labor_Burden_Markup_Pct]  DEFAULT ((0)) FOR [Labor_Burden_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Machine_Burden_Markup_Pct]  DEFAULT ((0)) FOR [Machine_Burden_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_GA_Burden_Markup_Pct]  DEFAULT ((0)) FOR [GA_Burden_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Lead_Days]  DEFAULT ((0)) FOR [Lead_Days]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Prepaid_Amt]  DEFAULT ((0)) FOR [Prepaid_Amt]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Split_To_Job]  DEFAULT ((0)) FOR [Split_To_Job]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_JOB_PriceUofM]  DEFAULT ((1)) FOR [Price_Unit_Conv]
    GO
    ALTER TABLE [dbo].[Job] ADD  DEFAULT ((0)) FOR [Prepaid_Tax_Amount]
    GO
    ALTER TABLE [dbo].[Job] ADD  DEFAULT ((0)) FOR [Prepaid_Trade_Amt]
    GO
    Order by COALESCE(b.[Part_Number],a.[Material],c.[Part_Number],b.[Job],a.[Job],c.[Job],b.[S/J],a.[S/J],c.[S/J])
    SWProduction

    Given exactly what you posted, there is a stray order by clause in the last batch of your script and it is the only statement in the batch.  Unfortunately, it is likely that something was mangled - which is why it is better to use the [insert code block]
    function as opposed to just copying the entire script into the text of the post.
    To short circuit things a bit, your join syntax is off.  You are joining a to b to c, so the basic structure of your statement should be:
    select
    from a join b on ...
    join c on ...
    where ...
    If you used CTEs instead of derived tables it might be easier for you to visually see that.  As a simple demonstration, consider:
    with ctea as (select 1 as id union all select 2),
    cteb as (select 1 as id union all select 3),
    ctec as (select 1 as id union all select 2 union all select 5)
    select *
    from ctea
    full join cteb on ctea.id = cteb.id
    full join ctec on ctea.id = ctec.id
    order by coalesce(cteb.id, ctea.id, ctec.id);
    go
    with ctea as (select 1 as id union all select 2),
    cteb as (select 1 as id union all select 3),
    ctec as (select 1 as id union all select 2 union all select 5)
    select *
    from ctea
    full join cteb
    full join ctec on ctea.id = cteb.id and ctea.id = ctec.id
    order by coalesce(cteb.id, ctea.id, ctec.id);
     And a last comment which I leave as a hint - do you really need those left joins in your derived tables?

  • PHP MYSQL KEYWORD SEARCH HELP

    Im creating a search for a image gallery and I want it to be able to pull up an image based on the keyword assigned to the image you searched. I have 4 fields in my DB, (id,layout"or image",description,key_words). My problem is when I enter a keyword in my textfield when the results page loads all I get is the field names (id,layout,description,key_words) instead of the actually data within those fields.
    I believe my problem lies within this line of code:
    $query_Recordset1 = sprintf("SELECT * FROM images2 WHERE key_words = %s ORDER BY id DESC", GetSQLValueString($colname_Recordset1, "text"));
    this code displays my DB field names, but not the data I inserted in those fields.
    So I tried changing the code to this:
    $query_Recordset1 = sprintf("SELECT * FROM images2 WHERE key_words LIKE '%$keyword%' ORDER BY id DESC", GetSQLValueString($colname_Recordset1, "text"));
    This code did display my mysql data, but not the data I entered in my textfield. With this code I don't even have to enter any keywords in the text field, I can simply click the search button and my mysql data would show up, even though I didn't enter a keyword...?
    Im very confused  I've been working on this off and on for  about a month now and have been in 3 different forums and know one seems to  be able to help. It would greatly appreciated if someone could help me  through this.
    Here is all my code for a better understanding:
    SEARCH PAGE:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <form id="form1" name="form1" method="get" action="r.php">
      <label for="textfield"></label>
      <input type="text" name="keyword" id="textfield" />
      <input type="submit" name="button" id="button" value="search" />
    </form>
    </body>
    </html>
    RESULTS PAGE:
    <?php require_once('Connections/MyConnection.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $maxRows_Recordset2 = 3;
    $pageNum_Recordset2 = 0;
    if (isset($_GET['pageNum_Recordset2'])) {
      $pageNum_Recordset2 = $_GET['pageNum_Recordset2'];
    $startRow_Recordset2 = $pageNum_Recordset2 * $maxRows_Recordset2;
    $colname_Recordset2 = "-1";
    if (isset($_GET['key_words'])) {
      $colname_Recordset2 = $_GET['key_words'];
    mysql_select_db($database_MyConnection, $MyConnection);
    $query_Recordset2 = sprintf("SELECT * FROM images2 WHERE key_words = %s ORDER BY id DESC", GetSQLValueString($colname_Recordset2, "text"));
    $query_limit_Recordset2 = sprintf("%s LIMIT %d, %d", $query_Recordset2, $startRow_Recordset2, $maxRows_Recordset2);
    $Recordset2 = mysql_query($query_limit_Recordset2, $MyConnection) or die(mysql_error());
    $row_Recordset2 = mysql_fetch_assoc($Recordset2);
    if (isset($_GET['totalRows_Recordset2'])) {
      $totalRows_Recordset2 = $_GET['totalRows_Recordset2'];
    } else {
      $all_Recordset2 = mysql_query($query_Recordset2);
      $totalRows_Recordset2 = mysql_num_rows($all_Recordset2);
    $totalPages_Recordset2 = ceil($totalRows_Recordset2/$maxRows_Recordset2)-1;
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <table>
      <tr>
        <td>id</td>
        <td>Layouts</td>
        <td>Descriptions</td>
        <td>key_words</td>
      </tr>
      <?php do { ?>
        <tr>
          <td><?php echo $row_Recordset2['id']; ?></td>
          <td><?php echo $row_Recordset2['Layouts']; ?></td>
          <td><?php echo $row_Recordset2['Descriptions']; ?></td>
          <td><?php echo $row_Recordset2['key_words']; ?></td>
        </tr>
        <?php } while ($row_Recordset2 = mysql_fetch_assoc($Recordset2)); ?>
    </table>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset2);
    ?>

    $query_Recordset1 = sprintf("SELECT * FROM images2 WHERE key_words LIKE '%$keyword%' ORDER BY id DESC", GetSQLValueString($colname_Recordset1, "text")); 
    Why are you using the $keyword variable rather than the sprintf parameter? I don't know php, but it seems like that is your problem. Maybe try something like this:
    $query_Recordset1 = sprintf("SELECT * FROM images2 WHERE key_words LIKE %s ORDER BY id DESC", GetSQLValueString("%" . $colname_Recordset1 . "%",  "text"));

  • Keyword sorting

    Hi and thanks for taking the time. I just upgraded to iPhoto '11(version 9) from version 7...not sure the year. I have been using keywords a lot and I would export the photo after adding keywords so the keywords would be part of the photo. For the past few years both jpegs and tiff images exported the keywords in the order I added them under the pic in iPhoto 7. However the past few months the tiffs would randomly rearrange the keyword order I had...jpegs exported in the order I wanted the keywords. Now with the new version of iPhoto no matter what order you add the keyword it will sort them alphabetically when your done so nothing I export has the keywords in the order I choose. I've read here people aren't happy with the new way keywords are shown only in the info area but no mention of the change to alphabetical order. Am I missing something or is there a way to order keywords randomly and export them in that order like in iPhoto 7? The order helps when there are multiple people in a pic. I try to get people to pose alphabetically for me but it can be difficult. Thank you.

    Hi Terrence. I was re-looking at your reply today. What are you referring to as caption? Are you meaning where it says add a description? I don't actually see the term caption. I used keywords for this originally because I wasn't sure if the description field would be seen in the meta tags as easily as keywords. Seems it does and thats how I will go forward. I wasn't sure what the best way to do it when I started but it seems now from your reply the description box (if thats what you mean by caption) is where I should be putting names in the order they are in on the pic. Thanks again for your time Terrence.

  • Is there a way to extract information from a registered schema ?

    Hello,
    with the aid of the XSOM project in java.net, and using the following after I loaded the appropriate jars and creating the wrapper PL/SQL
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED GMS10.XSOMNAVIGATOR AS
    import java.util.Vector;
    import com.sun.xml.xsom.XSComplexType;
    import com.sun.xml.xsom.XSElementDecl;
    import com.sun.xml.xsom.XSFacet;
    import com.sun.xml.xsom.XSModelGroup;
    import com.sun.xml.xsom.XSModelGroupDecl;
    import com.sun.xml.xsom.XSParticle;
    import com.sun.xml.xsom.XSRestrictionSimpleType;
    import com.sun.xml.xsom.XSSimpleType;
    import com.sun.xml.xsom.XSTerm;
    import com.sun.xml.xsom.parser.XSOMParser;
    public class XSOMNavigator
        public static class SimpleTypeRestriction
            public String[] enumeration = null;
            public String   maxValue    = null;
            public String   minValue    = null;
            public String   length      = null;
            public String   maxLength   = null;
            public String   minLength   = null;
            public String[] pattern     = null;
            public String   totalDigits = null;
            public String toString()
                String enumValues = "";
                if (enumeration != null)
                    for(String val : enumeration)
                        enumValues += val + ", ";
                    enumValues = enumValues.substring(0, enumValues.lastIndexOf(','));
                String patternValues = "";
                if (pattern != null)
                    for(String val : pattern)
                        patternValues += "(" + val + ")|";
                    patternValues = patternValues.substring(0, patternValues.lastIndexOf('|'));
                String retval = "";
                retval += maxValue    == null ? "" : "[MaxValue  = "   + maxValue      + "]\t";
                retval += minValue    == null ? "" : "[MinValue  = "   + minValue      + "]\t";
                retval += maxLength   == null ? "" : "[MaxLength = "   + maxLength     + "]\t";
                retval += minLength   == null ? "" : "[MinLength = "   + minLength     + "]\t";
                retval += pattern     == null ? "" : "[Pattern(s) = "  + patternValues + "]\t";
                retval += totalDigits == null ? "" : "[TotalDigits = " + totalDigits   + "]\t";
                retval += length      == null ? "" : "[Length = "      + length        + "]\t";         
                retval += enumeration == null ? "" : "[Values = "      + enumValues    + "]\t";
                return retval;
        private static void initRestrictions(XSSimpleType xsSimpleType, SimpleTypeRestriction simpleTypeRestriction)
            XSRestrictionSimpleType restriction = xsSimpleType.asRestriction();
            if (restriction != null)
                Vector<String> enumeration = new Vector<String>();
                Vector<String> pattern     = new Vector<String>();
                for (XSFacet facet : restriction.getDeclaredFacets())
                    if (facet.getName().equals(XSFacet.FACET_ENUMERATION))
                        enumeration.add(facet.getValue().value);
                    if (facet.getName().equals(XSFacet.FACET_MAXINCLUSIVE))
                        simpleTypeRestriction.maxValue = facet.getValue().value;
                    if (facet.getName().equals(XSFacet.FACET_MININCLUSIVE))
                        simpleTypeRestriction.minValue = facet.getValue().value;
                    if (facet.getName().equals(XSFacet.FACET_MAXEXCLUSIVE))
                        simpleTypeRestriction.maxValue = String.valueOf(Integer.parseInt(facet.getValue().value) - 1);
                    if (facet.getName().equals(XSFacet.FACET_MINEXCLUSIVE))
                        simpleTypeRestriction.minValue = String.valueOf(Integer.parseInt(facet.getValue().value) + 1);
                    if (facet.getName().equals(XSFacet.FACET_LENGTH))
                        simpleTypeRestriction.length = facet.getValue().value;
                    if (facet.getName().equals(XSFacet.FACET_MAXLENGTH))
                        simpleTypeRestriction.maxLength = facet.getValue().value;
                    if (facet.getName().equals(XSFacet.FACET_MINLENGTH))
                        simpleTypeRestriction.minLength = facet.getValue().value;
                    if (facet.getName().equals(XSFacet.FACET_PATTERN))
                        pattern.add(facet.getValue().value);
                    if (facet.getName().equals(XSFacet.FACET_TOTALDIGITS))
                        simpleTypeRestriction.totalDigits = facet.getValue().value;
                if (enumeration.size() > 0)
                    simpleTypeRestriction.enumeration = enumeration.toArray(new String[] {});
                if (pattern.size() > 0)
                    simpleTypeRestriction.pattern = pattern.toArray(new String[] {});
        private static void printParticle(XSParticle particle, String occurs, String absPath, String indent)
            occurs = "  MinOccurs = " + particle.getMinOccurs() + ", MaxOccurs = " + particle.getMaxOccurs();
            XSTerm term = particle.getTerm();
            if (term.isModelGroup())
                printGroup(term.asModelGroup(), occurs, absPath, indent);   
            else if(term.isModelGroupDecl())
                printGroupDecl(term.asModelGroupDecl(), occurs, absPath, indent);   
            else if (term.isElementDecl())
                printElement(term.asElementDecl(), occurs, absPath, indent);
            else
        private static void printGroup(XSModelGroup modelGroup, String occurs, String absPath, String indent)
            System.out.println(indent + "[Start of " + modelGroup.getCompositor() + occurs + "]" );
            for (XSParticle particle : modelGroup.getChildren())
                printParticle(particle, occurs, absPath, indent + "\t");
            System.out.println(indent + "[End of " + modelGroup.getCompositor() + "]");
        private static void printGroupDecl(XSModelGroupDecl modelGroupDecl, String occurs, String absPath, String indent)
            System.out.println(indent + "[Group " + modelGroupDecl.getName() + occurs + "]");
            printGroup(modelGroupDecl.getModelGroup(), occurs, absPath, indent);
        private static void printComplexType(XSComplexType complexType, String occurs, String absPath, String indent)
            System.out.println();
            XSParticle particle = complexType.getContentType().asParticle();
            if (particle != null)
                printParticle(particle, occurs, absPath, indent);
        private static void printSimpleType(XSSimpleType simpleType, String occurs, String absPath, String indent)
            SimpleTypeRestriction restriction = new SimpleTypeRestriction();
            initRestrictions(simpleType, restriction);
            System.out.println(restriction.toString());
        private static void printElement(XSElementDecl element, String occurs, String absPath, String indent)
            absPath += "/" + element.getName();
            System.out.print(indent + "[Element " + absPath + "   " + occurs + "] of type [" + element.getType().getBaseType().getName() + "]");
            if (element.getType().isComplexType())
                printComplexType(element.getType().asComplexType(), occurs, absPath, indent);
            else
                printSimpleType(element.getType().asSimpleType(), occurs, absPath, indent);
        public static void xsomNavigate(String xsdFile, String rootElement)
            String occurs  = "";
            String absPath = "";
            String indent  = "";
            try
                XSOMParser parser = new XSOMParser();
                parser.parse(xsdFile);
                printElement(parser.getResult().getSchema(1).getElementDecl(rootElement), occurs, absPath, indent);
            catch (Exception exp)
                exp.printStackTrace(System.out);
    /I obtained the following (correct) result
    [Element /CD026A   ] of type [anyType]
    [Start of sequence  MinOccurs = 1, MaxOccurs = 1]
         [Group HEADER  MinOccurs = 1, MaxOccurs = 1]
         [Start of sequence  MinOccurs = 1, MaxOccurs = 1]
              [Element /CD026A/SynIdeMES1     MinOccurs = 1, MaxOccurs = 1] of type [string][Values = UNOC]     
              [Element /CD026A/SynVerNumMES2     MinOccurs = 1, MaxOccurs = 1] of type [string][Values = 3]     
              [Element /CD026A/MesSenMES3     MinOccurs = 1, MaxOccurs = 1] of type [string][MaxLength = 70]     
              [Element /CD026A/SenIdeCodQuaMES4     MinOccurs = 0, MaxOccurs = 1] of type [string][MaxLength = 4]     
              [Element /CD026A/MesRecMES6     MinOccurs = 1, MaxOccurs = 1] of type [string][MaxLength = 35]     
              [Element /CD026A/RecIdeCodQuaMES7     MinOccurs = 0, MaxOccurs = 1] of type [string][MaxLength = 4]     
              [Element /CD026A/DatOfPreMES9     MinOccurs = 1, MaxOccurs = 1] of type [nonNegativeInteger][Pattern(s) = ([1-2][0-9]{3}[0][1-9][0][1-9])|([1-2][0-9]{3}[0][1-9][1|2][0-9])|([1-2][0-9]{3}[0][1-9][3][0|1])|([1-2][0-9]{3}[1][0-2][0][1-9])|([1-2][0-9]{3}[1][0-2][1|2][0-9])|([1-2][0-9]{3}[1][0-2][3][0|1])|([0-9]{2}[0][1-9][0][1-9])|([0-9]{2}[0][1-9][1|2][0-9])|([0-9]{2}[0][1-9][3][0|1])|([0-9]{2}[1][0-2][0][1-9])|([0-9]{2}[1][0-2][1|2][0-9])|([0-9]{2}[1][0-2][3][0|1])]     
              [Element /CD026A/TimOfPreMES10     MinOccurs = 1, MaxOccurs = 1] of type [string][Pattern(s) = ([0-1]{1}[0-9]{1}[0-5]{1}[0-9]{1})|([2]{1}[0-3]{1}[0-5]{1}[0-9]{1})]     [Length = 4]     
              [Element /CD026A/IntConRefMES11     MinOccurs = 1, MaxOccurs = 1] of type [string][MaxLength = 14]     
              [Element /CD026A/RecRefMES12     MinOccurs = 0, MaxOccurs = 1] of type [string][MaxLength = 14]     
              [Element /CD026A/RecRefQuaMES13     MinOccurs = 0, MaxOccurs = 1] of type [string][Length = 2]     
              [Element /CD026A/AppRefMES14     MinOccurs = 0, MaxOccurs = 1] of type [string][MaxLength = 14]     
              [Element /CD026A/PriMES15     MinOccurs = 0, MaxOccurs = 1] of type [string][MaxLength = 1]     
              [Element /CD026A/AckReqMES16     MinOccurs = 0, MaxOccurs = 1] of type [nonNegativeInteger][Values = 0, 1]     
              [Element /CD026A/ComAgrIdMES17     MinOccurs = 0, MaxOccurs = 1] of type [string][MaxLength = 35]     
              [Element /CD026A/TesIndMES18     MinOccurs = 0, MaxOccurs = 1] of type [nonNegativeInteger][Values = 0, 1]     
              [Element /CD026A/MesIdeMES19     MinOccurs = 1, MaxOccurs = 1] of type [string][MaxLength = 14]     
              [Element /CD026A/MesTypMES20     MinOccurs = 1, MaxOccurs = 1] of type [string][Values = CC004A, CC005A, CC007A, CC008A, CC009A, CC013A, CC014A, CC015A, CC016A, CC017A, CC019A, CC021A, CC023A, CC025A, CC026A, CC028A, CC029A, CC035A, CC043A, CC044A, CC045A, CC051A, CC054A, CC055A, CC058A, CC060A, CC062A, CC100A, CC102A, CC103A, CC224A, CC225A, CC228A, CC229A, CC231A, CC907A, CC917A, CD001A, CD002A, CD003A, CD006A, CD010A, CD018A, CD020A, CD024A, CD027A, CD030A, CD031A, CD032A, CD033A, CD034A, CD037A, CD038A, CD050A, CD059A, CD063A, CD104A, CD105A, CD106A, CD111A, CD112A, CD114A, CD115A, CD118A, CD200A, CD201A, CD203A, CD204A, CD205A, CD209A, CD411A, CD901A, CD904A, CD905A, CD906A, CD907A, CD912A, CD913A, CD914A, CD916A, CD931A, CD932A, AT004A, AT005A, AT007A, AT008A, AT009A, AT013A, AT014A, AT015A, AT016A, AT017A, AT019A, AT021A, AT023A, AT025A, AT026A, AT028A, AT029A, AT035A, AT043A, AT044A, AT045A, AT051A, AT054A, AT055A, AT058A, AT060A, AT062A, AT100A, AT102A, AT103A, AT224A, AT225A, AT228A, AT229A, AT231A, AT907A, AT917A, BE004A, BE005A, BE007A, BE008A, BE009A, BE013A, BE014A, BE015A, BE016A, BE017A, BE019A, BE021A, BE023A, BE025A, BE026A, BE028A, BE029A, BE035A, BE043A, BE044A, BE045A, BE051A, BE054A, BE055A, BE058A, BE060A, BE062A, BE100A, BE102A, BE103A, BE224A, BE225A, BE228A, BE229A, BE231A, BE907A, BE917A, CY004A, CY005A, CY007A, CY008A, CY009A, CY013A, CY014A, CY015A, CY016A, CY017A, CY019A, CY021A, CY023A, CY025A, CY026A, CY028A, CY029A, CY035A, CY043A, CY044A, CY045A, CY051A, CY054A, CY055A, CY058A, CY060A, CY062A, CY100A, CY102A, CY103A, CY224A, CY225A, CY228A, CY229A, CY231A, CY907A, CY917A, CZ004A, CZ005A, CZ007A, CZ008A, CZ009A, CZ013A, CZ014A, CZ015A, CZ016A, CZ017A, CZ019A, CZ021A, CZ023A, CZ025A, CZ026A, CZ028A, CZ029A, CZ035A, CZ043A, CZ044A, CZ045A, CZ051A, CZ054A, CZ055A, CZ058A, CZ060A, CZ062A, CZ100A, CZ102A, CZ103A, CZ224A, CZ225A, CZ228A, CZ229A, CZ231A, CZ907A, CZ917A, DE004A, DE005A, DE007A, DE008A, DE009A, DE013A, DE014A, DE015A, DE016A, DE017A, DE019A, DE021A, DE023A, DE025A, DE026A, DE028A, DE029A, DE035A, DE043A, DE044A, DE045A, DE051A, DE054A, DE055A, DE058A, DE060A, DE062A, DE100A, DE102A, DE103A, DE224A, DE225A, DE228A, DE229A, DE231A, DE907A, DE917A, DK004A, DK005A, DK007A, DK008A, DK009A, DK013A, DK014A, DK015A, DK016A, DK017A, DK019A, DK021A, DK023A, DK025A, DK026A, DK028A, DK029A, DK035A, DK043A, DK044A, DK045A, DK051A, DK054A, DK055A, DK058A, DK060A, DK062A, DK100A, DK102A, DK103A, DK224A, DK225A, DK228A, DK229A, DK231A, DK907A, DK917A, EE004A, EE005A, EE007A, EE008A, EE009A, EE013A, EE014A, EE015A, EE016A, EE017A, EE019A, EE021A, EE023A, EE025A, EE026A, EE028A, EE029A, EE035A, EE043A, EE044A, EE045A, EE051A, EE054A, EE055A, EE058A, EE060A, EE062A, EE100A, EE102A, EE103A, EE224A, EE225A, EE228A, EE229A, EE231A, EE907A, EE917A, ES004A, ES005A, ES007A, ES008A, ES009A, ES013A, ES014A, ES015A, ES016A, ES017A, ES019A, ES021A, ES023A, ES025A, ES026A, ES028A, ES029A, ES035A, ES043A, ES044A, ES045A, ES051A, ES054A, ES055A, ES058A, ES060A, ES062A, ES100A, ES102A, ES103A, ES224A, ES225A, ES228A, ES229A, ES231A, ES907A, ES917A, FI004A, FI005A, FI007A, FI008A, FI009A, FI013A, FI014A, FI015A, FI016A, FI017A, FI019A, FI021A, FI023A, FI025A, FI026A, FI028A, FI029A, FI035A, FI043A, FI044A, FI045A, FI051A, FI054A, FI055A, FI058A, FI060A, FI062A, FI100A, FI102A, FI103A, FI224A, FI225A, FI228A, FI229A, FI231A, FI907A, FI917A, FR004A, FR005A, FR007A, FR008A, FR009A, FR013A, FR014A, FR015A, FR016A, FR017A, FR019A, FR021A, FR023A, FR025A, FR026A, FR028A, FR029A, FR035A, FR043A, FR044A, FR045A, FR051A, FR054A, FR055A, FR058A, FR060A, FR062A, FR100A, FR102A, FR103A, FR224A, FR225A, FR228A, FR229A, FR231A, FR907A, FR917A, GB004A, GB005A, GB007A, GB008A, GB009A, GB013A, GB014A, GB015A, GB016A, GB017A, GB019A, GB021A, GB023A, GB025A, GB026A, GB028A, GB029A, GB035A, GB043A, GB044A, GB045A, GB051A, GB054A, GB055A, GB058A, GB060A, GB062A, GB100A, GB102A, GB103A, GB224A, GB225A, GB228A, GB229A, GB231A, GB907A, GB917A, GF004A, GF005A, GF007A, GF008A, GF009A, GF013A, GF014A, GF015A, GF016A, GF017A, GF019A, GF021A, GF023A, GF025A, GF026A, GF028A, GF029A, GF035A, GF043A, GF044A, GF045A, GF051A, GF054A, GF055A, GF058A, GF060A, GF062A, GF100A, GF102A, GF103A, GF224A, GF225A, GF228A, GF229A, GF231A, GF907A, GF917A, GP004A, GP005A, GP007A, GP008A, GP009A, GP013A, GP014A, GP015A, GP016A, GP017A, GP019A, GP021A, GP023A, GP025A, GP026A, GP028A, GP029A, GP035A, GP043A, GP044A, GP045A, GP051A, GP054A, GP055A, GP058A, GP060A, GP062A, GP100A, GP102A, GP103A, GP224A, GP225A, GP228A, GP229A, GP231A, GP907A, GP917A, GR004A, GR005A, GR007A, GR008A, GR009A, GR013A, GR014A, GR015A, GR016A, GR017A, GR019A, GR021A, GR023A, GR025A, GR026A, GR028A, GR029A, GR035A, GR043A, GR044A, GR045A, GR051A, GR054A, GR055A, GR058A, GR060A, GR062A, GR100A, GR102A, GR103A, GR224A, GR225A, GR228A, GR229A, GR231A, GR907A, GR917A, HU004A, HU005A, HU007A, HU008A, HU009A, HU013A, HU014A, HU015A, HU016A, HU017A, HU019A, HU021A, HU023A, HU025A, HU026A, HU028A, HU029A, HU035A, HU043A, HU044A, HU045A, HU051A, HU054A, HU055A, HU058A, HU060A, HU062A, HU100A, HU102A, HU103A, HU224A, HU225A, HU228A, HU229A, HU231A, HU907A, HU917A, IE004A, IE005A, IE007A, IE008A, IE009A, IE013A, IE014A, IE015A, IE016A, IE017A, IE019A, IE021A, IE023A, IE025A, IE026A, IE028A, IE029A, IE035A, IE043A, IE044A, IE045A, IE051A, IE054A, IE055A, IE058A, IE060A, IE062A, IE100A, IE102A, IE103A, IE224A, IE225A, IE228A, IE229A, IE231A, IE907A, IE917A, IT004A, IT005A, IT007A, IT008A, IT009A, IT013A, IT014A, IT015A, IT016A, IT017A, IT019A, IT021A, IT023A, IT025A, IT026A, IT028A, IT029A, IT035A, IT043A, IT044A, IT045A, IT051A, IT054A, IT055A, IT058A, IT060A, IT062A, IT100A, IT102A, IT103A, IT224A, IT225A, IT228A, IT229A, IT231A, IT907A, IT917A, LT004A, LT005A, LT007A, LT008A, LT009A, LT013A, LT014A, LT015A, LT016A, LT017A, LT019A, LT021A, LT023A, LT025A, LT026A, LT028A, LT029A, LT035A, LT043A, LT044A, LT045A, LT051A, LT054A, LT055A, LT058A, LT060A, LT062A, LT100A, LT102A, LT103A, LT224A, LT225A, LT228A, LT229A, LT231A, LT907A, LT917A, LU004A, LU005A, LU007A, LU008A, LU009A, LU013A, LU014A, LU015A, LU016A, LU017A, LU019A, LU021A, LU023A, LU025A, LU026A, LU028A, LU029A, LU035A, LU043A, LU044A, LU045A, LU051A, LU054A, LU055A, LU058A, LU060A, LU062A, LU100A, LU102A, LU103A, LU224A, LU225A, LU228A, LU229A, LU231A, LU907A, LU917A, LV004A, LV005A, LV007A, LV008A, LV009A, LV013A, LV014A, LV015A, LV016A, LV017A, LV019A, LV021A, LV023A, LV025A, LV026A, LV028A, LV029A, LV035A, LV043A, LV044A, LV045A, LV051A, LV054A, LV055A, LV058A, LV060A, LV062A, LV100A, LV102A, LV103A, LV224A, LV225A, LV228A, LV229A, LV231A, LV907A, LV917A, MC004A, MC005A, MC007A, MC008A, MC009A, MC013A, MC014A, MC015A, MC016A, MC017A, MC019A, MC021A, MC023A, MC025A, MC026A, MC028A, MC029A, MC035A, MC043A, MC044A, MC045A, MC051A, MC054A, MC055A, MC058A, MC060A, MC062A, MC100A, MC102A, MC103A, MC224A, MC225A, MC228A, MC229A, MC231A, MC907A, MC917A, MQ004A, MQ005A, MQ007A, MQ008A, MQ009A, MQ013A, MQ014A, MQ015A, MQ016A, MQ017A, MQ019A, MQ021A, MQ023A, MQ025A, MQ026A, MQ028A, MQ029A, MQ035A, MQ043A, MQ044A, MQ045A, MQ051A, MQ054A, MQ055A, MQ058A, MQ060A, MQ062A, MQ100A, MQ102A, MQ103A, MQ224A, MQ225A, MQ228A, MQ229A, MQ231A, MQ907A, MQ917A, MT004A, MT005A, MT007A, MT008A, MT009A, MT013A, MT014A, MT015A, MT016A, MT017A, MT019A, MT021A, MT023A, MT025A, MT026A, MT028A, MT029A, MT035A, MT043A, MT044A, MT045A, MT051A, MT054A, MT055A, MT058A, MT060A, MT062A, MT100A, MT102A, MT103A, MT224A, MT225A, MT228A, MT229A, MT231A, MT907A, MT917A, NL004A, NL005A, NL007A, NL008A, NL009A, NL013A, NL014A, NL015A, NL016A, NL017A, NL019A, NL021A, NL023A, NL025A, NL026A, NL028A, NL029A, NL035A, NL043A, NL044A, NL045A, NL051A, NL054A, NL055A, NL058A, NL060A, NL062A, NL100A, NL102A, NL103A, NL224A, NL225A, NL228A, NL229A, NL231A, NL907A, NL917A, PL004A, PL005A, PL007A, PL008A, PL009A, PL013A, PL014A, PL015A, PL016A, PL017A, PL019A, PL021A, PL023A, PL025A, PL026A, PL028A, PL029A, PL035A, PL043A, PL044A, PL045A, PL051A, PL054A, PL055A, PL058A, PL060A, PL062A, PL100A, PL102A, PL103A, PL224A, PL225A, PL228A, PL229A, PL231A, PL907A, PL917A, PT004A, PT005A, PT007A, PT008A, PT009A, PT013A, PT014A, PT015A, PT016A, PT017A, PT019A, PT021A, PT023A, PT025A, PT026A, PT028A, PT029A, PT035A, PT043A, PT044A, PT045A, PT051A, PT054A, PT055A, PT058A, PT060A, PT062A, PT100A, PT102A, PT103A, PT224A, PT225A, PT228A, PT229A, PT231A, PT907A, PT917A, RE004A, RE005A, RE007A, RE008A, RE009A, RE013A, RE014A, RE015A, RE016A, RE017A, RE019A, RE021A, RE023A, RE025A, RE026A, RE028A, RE029A, RE035A, RE043A, RE044A, RE045A, RE051A, RE054A, RE055A, RE058A, RE060A, RE062A, RE100A, RE102A, RE103A, RE224A, RE225A, RE228A, RE229A, RE231A, RE907A, RE917A, SE004A, SE005A, SE007A, SE008A, SE009A, SE013A, SE014A, SE015A, SE016A, SE017A, SE019A, SE021A, SE023A, SE025A, SE026A, SE028A, SE029A, SE035A, SE043A, SE044A, SE045A, SE051A, SE054A, SE055A, SE058A, SE060A, SE062A, SE100A, SE102A, SE103A, SE224A, SE225A, SE228A, SE229A, SE231A, SE907A, SE917A, SI004A, SI005A, SI007A, SI008A, SI009A, SI013A, SI014A, SI015A, SI016A, SI017A, SI019A, SI021A, SI023A, SI025A, SI026A, SI028A, SI029A, SI035A, SI043A, SI044A, SI045A, SI051A, SI054A, SI055A, SI058A, SI060A, SI062A, SI100A, SI102A, SI103A, SI224A, SI225A, SI228A, SI229A, SI231A, SI907A, SI917A, SK004A, SK005A, SK007A, SK008A, SK009A, SK013A, SK014A, SK015A, SK016A, SK017A, SK019A, SK021A, SK023A, SK025A, SK026A, SK028A, SK029A, SK035A, SK043A, SK044A, SK045A, SK051A, SK054A, SK055A, SK058A, SK060A, SK062A, SK100A, SK102A, SK103A, SK224A, SK225A, SK228A, SK229A, SK231A, SK907A, SK917A, CH004A, CH005A, CH007A, CH008A, CH009A, CH013A, CH014A, CH015A, CH016A, CH017A, CH019A, CH021A, CH023A, CH025A, CH026A, CH028A, CH029A, CH035A, CH043A, CH044A, CH045A, CH051A, CH054A, CH055A, CH058A, CH060A, CH062A, CH100A, CH102A, CH103A, CH224A, CH225A, CH228A, CH229A, CH231A, CH907A, CH917A, IS004A, IS005A, IS007A, IS008A, IS009A, IS013A, IS014A, IS015A, IS016A, IS017A, IS019A, IS021A, IS023A, IS025A, IS026A, IS028A, IS029A, IS035A, IS043A, IS044A, IS045A, IS051A, IS054A, IS055A, IS058A, IS060A, IS062A, IS100A, IS102A, IS103A, IS224A, IS225A, IS228A, IS229A, IS231A, IS907A, IS917A, NO004A, NO005A, NO007A, NO008A, NO009A, NO013A, NO014A, NO015A, NO016A, NO017A, NO019A, NO021A, NO023A, NO025A, NO026A, NO028A, NO029A, NO035A, NO043A, NO044A, NO045A, NO051A, NO054A, NO055A, NO058A, NO060A, NO062A, NO100A, NO102A, NO103A, NO224A, NO225A, NO228A, NO229A, NO231A, NO907A, NO917A, SJ004A, SJ005A, SJ007A, SJ008A, SJ009A, SJ013A, SJ014A, SJ015A, SJ016A, SJ017A, SJ019A, SJ021A, SJ023A, SJ025A, SJ026A, SJ028A, SJ029A, SJ035A, SJ043A, SJ044A, SJ045A, SJ051A, SJ054A, SJ055A, SJ058A, SJ060A, SJ062A, SJ100A, SJ102A, SJ103A, SJ224A, SJ225A, SJ228A, SJ229A, SJ231A, SJ907A, SJ917A]     
              [Element /CD026A/ComAccRefMES21     MinOccurs = 0, MaxOccurs = 1] of type [string][MaxLength = 35]     
              [Element /CD026A/MesSeqNumMES22     MinOccurs = 0, MaxOccurs = 1] of type [nonNegativeInteger][TotalDigits = 2]     
              [Element /CD026A/FirAndLasTraMES23     MinOccurs = 0, MaxOccurs = 1] of type [string][Values = F, L]     
         [End of sequence]
         [Element /CD026A/TRAPRIPC1     MinOccurs = 1, MaxOccurs = 1] of type [anyType]
         [Start of sequence  MinOccurs = 1, MaxOccurs = 1]
              [Element /CD026A/TRAPRIPC1/TINPC159     MinOccurs = 1, MaxOccurs = 1] of type [string][MaxLength = 17]     
         [End of sequence]
         [Element /CD026A/CUSTOFFGUARNT     MinOccurs = 1, MaxOccurs = 1] of type [anyType]
         [Start of sequence  MinOccurs = 1, MaxOccurs = 1]
              [Element /CD026A/CUSTOFFGUARNT/RefNumRNT1     MinOccurs = 1, MaxOccurs = 1] of type [string][Length = 8]     
         [End of sequence]
         [Element /CD026A/GUAREF2     MinOccurs = 1, MaxOccurs = 1] of type [anyType]
         [Start of sequence  MinOccurs = 1, MaxOccurs = 1]
              [Element /CD026A/GUAREF2/GuaRefNumGRNREF21     MinOccurs = 1, MaxOccurs = 1] of type [string][MaxLength = 24]     
              [Element /CD026A/GUAREF2/ACCDOC728     MinOccurs = 0, MaxOccurs = 99] of type [anyType]
              [Start of sequence  MinOccurs = 1, MaxOccurs = 1]
                   [Element /CD026A/GUAREF2/ACCDOC728/AccCodCOD729     MinOccurs = 1, MaxOccurs = 1] of type [string][Length = 4]     
              [End of sequence]
              [Element /CD026A/GUAREF2/ACCDOCPC4     MinOccurs = 1, MaxOccurs = 1] of type [anyType]
              [Start of sequence  MinOccurs = 1, MaxOccurs = 1]
                   [Element /CD026A/GUAREF2/ACCDOCPC4/AccCodPC41     MinOccurs = 1, MaxOccurs = 1] of type [string][Length = 4]     
              [End of sequence]
              [Element /CD026A/GUAREF2/ACCCODPC3     MinOccurs = 1, MaxOccurs = 1] of type [anyType]
              [Start of sequence  MinOccurs = 1, MaxOccurs = 1]
                   [Element /CD026A/GUAREF2/ACCCODPC3/AccCodPC31     MinOccurs = 1, MaxOccurs = 1] of type [string][Length = 4]     
              [End of sequence]
         [End of sequence]
    [End of sequence]I still thing this is a bit of an overkill, but I will use it as a last resort in order to substitute the built-in parser so I can collect all the errors of an XML source in one go.
    Is there a way to obtain the same information from the XDB registry where my schemas will reside ? If yes, I will gladly substitute this Java class with whatever your suggestion is :)
    If not, I intend to store the extracted information in suitably constructed database tables and use a PL/SQL procedure to do the validation by traversing the table information accordingly (XPath by XPath) collecting the errors as I traverse the XML. Hopefully, due to the XPaths being very targeted towards the information that will be checked, I will avoid the DOM memory tree overhead.
    Finally, if I follow the path I described, is there a way to put some sort of trigger for the cases of copyEvolve(), inPlaceEvolve() and drop-and-reinsert so that my process will be called again for the new data ?
    Apologies for the lengthy code and result set.
    Best Regards
    Philip
    PS: I did not include the XSD file itself because it includes another four XSDs. If needed I will do it in a reply post though ...

    Good morning Marco,
    I am back at the office today, so I am trying to catch up with everything.
    If I remember though, RESOURCE_VIEW and PATH_VIEW are related to the "exploration" of the XDB registry (but I may very well be wrong !).
    What I want is to retrieve schema information (if XDB actually shreds the XML schema on registration) like elements paths, simple and complex type contents, sequence information, particle occurence information, groups and group declarations etc.
    I think it makes sense that Oracle stores these somewhere, since it uses the information on OR storage to generate types and tables anyway ;) That is of course if the whole OR shredding is not done totally on-the-fly...
    I managed to get clearance to release partial information about some of the schemas and their related documentation, so I will be passing them to you and Mark through private emails (of course) in order to give you a clearer understanding of the whole project.
    Just give me a day to write a few pages that explain how the whole operation is performed.
    Best Regards
    Philip

  • Search Query Help – more than one word

    I have been struggling with this for weeks.  I used Dreamweaver to set up a lot of this and I think it is hindering me as I make changes to the code.
    I have a search interface that takes the input from a user (in the form of text) – searches though the db to match words – then return the results based on how many times the input is located in the db.
    I have this working very good for a single word input.  If you search for one word only – it works great.  But, if you try to input two words together – it returns no results.
    I have tried several different things to get this to work – like exploding the input then searching the db for each word in order.  The problems I get, I think, is that this conflicts with the code Dreamweaver wrote – I think where the code requests the value string.  But, each time I think I find a fix for one error – it creates several others – not just in the php code above the header – but in the php code in the body when I try to retrieve the results.
    It seems that I am just going around in circles.  But, there has to be simple way to search for more than one word in the db – count the matches – add the matches from each search together – then return the results ordered by the largest number of matches.
    I have even tried using a foreach statement – but received errors that I have never seen before.  Then after researching and trying to fix those errors – just received more and more errors.
    Please help.  If it cannot be done given the code I have – then please point me in the right direction to rewrite the code.
    Code is attached.

    Based on what you explained as your requirements, it is very easy. I'll just speak in psuedo-code.  You will need to parse the input into seperate words. If there can be an unknown number of words you can store those in a string array.
    Then just use the array to build your where clause using the IN predicate or using the = and OR operators.
    Select count(*), keyword
    where keyword in (term[0], term[1], etc)
    group by keyword
    order by count(*) desc
    If this is not what you meant, then you will need to explain your requirements in more detail. As you have discovered, once your requirements exceep the capabilities of DW's behaviors, you will need to become very familar with sql and your server side scripting language. If you don't understand what the DW code is doing (as evidenced by your comments in the attachment), then you really are not ready to start modifying it.

  • Fulltext search help

    Hi this might be the wrong place to put this question but i need help as i'm a newbie
    What I want to do if create a full search for my users so they can search my database on fishing locations in the UK, I have set up a database with 1 table and 7 columns the columns are named id, country, area, river, beat, desc and img, I want my users to be able to search 4 of these columns (country, area, river, beat)
    Basically what I am asking is if a user types in "fishing in (country) or (area) on the (river) at (beat)" or "I would like to fish in (area) on the (river)" and it comes up with results or lists of rivers and beats in that area
    I have tried many different ways and nothing seems to work my last effort was with this code
    <?php
        if ($c != 1) {
    ?>
    <form action="this.php?c=1">
    <input type="text" name="keyword">
    <input type="submit" value="Search!">
    </form>
    <?php
        } else if ($c==1) {
            MySQL_connect("localhoste", "root", "robert");
            MySQL_select_db("fish_db");
            $sql = "
                SELECT *,
                    MATCH(tb_country, tb_area, tb_river, tb_beat, tb_desc) AGAINST('$keyword') AS score
                    FROM articles
                WHERE MATCH(tb_country, tb_area, tb_river, tb_beat, tb_desc) AGAINST('$keyword')
                ORDER BY score DESC
            $res = MySQL_query($sql);
    If anyone could help or point me in the right direction i would be very very greatful
    Thanks
    Rob

    Have you reviewed your full text logs?  This tracks the errors that arise in full text indexing.  You can look for the file location and log files, but checking this page:
    http://technet.microsoft.com/en-us/library/ms142495(v=sql.105).aspx
    You may have a threading model problem with the multi-threaded Word filter and the single-threaded Adobe PDF filter.  This is discussed here:
    http://technet.microsoft.com/en-us/library/ms345185(v=sql.105).aspx
    This warns of 'slow' filtering, but I have experienced very large retry counts when in this state.  You have a couple of options.
    Alter the threading model for Word to Apartment threading.
    Purchase a multi-threaded PDF IFilter, such as the Fox-It IFilter.  (It is not free, but it works well.)
    RLF

  • MX / PHP / MySQL results_page help

    Desperately seeking help. I am using dreamweaver, php and
    MySql. I am building my first dynamic web page (so be easy on me, I
    am green:) and I am having troubles with a results page. I got the
    simple SearchString working just fine – but I can't get an
    advanced search page to work.
    On the search page, I have several list boxes (for simplicity
    I will only refer to two of these list boxes). The list boxes are
    in a form named form2. The list boxes allow a user to select one or
    many. Rather than listing the menu structure, I have this set up
    dynamically (pulls the info from the database).
    In the returned_results page, I have a recordset with the SQL
    e.g.: (keep in mind that form2 doesn't appear in the query anywhere
    – this might be the problem?)
    SELECT blah blah
    FROM blah blah
    WHERE RESTAURANTPRICE_ID like 'value1' AND CUISINE_ID like
    'value2'
    ORDER BY REST_NAME ASC
    Variables:
    Name; default value; runtime value
    value1 % $_GET['PRICE_Price']
    value2 % $_GET['CUISINE_Name']
    Now if I test this from the search page, the returned_results
    returns ALL columns of data, regardless of what I selected from the
    list boxes. Tested it again by changing the default variable value1
    and value2 to 1 and it will return ALL columns that meet this
    criteria, but again, this is regardless of what I selected from the
    list box.
    Somehow my returned_results query works fine on its own, but
    its not making the connection from the search page where a user
    would select their criteria.
    I can upload code if needed. What the heck am I doing wrong?

    $query_Recordset1 = sprintf("SELECT * FROM images2 WHERE key_words LIKE '%$keyword%' ORDER BY id DESC", GetSQLValueString($colname_Recordset1, "text")); 
    Why are you using the $keyword variable rather than the sprintf parameter? I don't know php, but it seems like that is your problem. Maybe try something like this:
    $query_Recordset1 = sprintf("SELECT * FROM images2 WHERE key_words LIKE %s ORDER BY id DESC", GetSQLValueString("%" . $colname_Recordset1 . "%",  "text"));

  • 1 month for installation !!!!

    I have unfortunatley had to resort to ordering BT Infinity as Virgin Media are not available at my new house.
    Having been through the process of placing the order, it is only after you confirm that you get told the news it will take 1 month to enable !!!
    I also at the same time called Virgin Media to transfer my tv, phone and broadband to a family members, requiring an engineer at the house to cable it up, its booked in for Monday !!!
    Looking at this forum and the feedback being received I am wondering if I have made a terrible mistake. Should I cancel within my 14 days? Hopefully someone from BT will reply and tell me this is all wrong and it will be setup next week?
    Thanks
    Andy

    digitalfriction wrote:
    You dont mean BT are overselling without caring if they can meet the demand?
    Lol, they really are a terrible company for customer service and performance, they just take the money and dont care.
    Its very unfortunate that whoever you choose in some areas, you will have to use BT at some point. Virgin really do make them look bad.
    But as you have checked for e.g. talk talk you will see that all companies all do the selling first and foremost. Remember that your contract will be with BT Retail. OpenReach - although actually part of BT - are run as a totally separate unit that aren't allowed to give preference to any particular ISP  and will have to work through all the orders.

  • CFIF inside a SQL statment

    I have a search page that has 3 possible entries. Service,
    City, & Keywords.
    Service and City are list/menus and cannot be null, but
    Keywords is a text
    box and can be null.
    I need to write a SQL statement to take the 3 possible
    parameters and test
    them against the database. Since the first 2 are never null,
    I can write
    them right inside the SQL string, but how can I only check
    for the keywords
    if there is something inside the box?
    Can I use a <cfif> statement inside the sql string to
    only check the 3rd
    parameter if it is not NULL?
    I wrote this:
    Select company, name, phone, city, state, username FROM
    members WHERE
    city = Form.City AND state = Form.state AND keywords LIKE
    Form.keywords
    ORDER BY company ASC
    Also, since I am passing it from a search page to a results
    page, would it
    be URL.City verses FORM.City, etc.
    Also would like to do this in a component and pass the 3
    variables as
    arguments with the city and service being required and the
    keywords not.
    However, I have no idea on what the procedure is for this.
    I wrote:
    <cfcomponent>
    <cffunction name="ServiceSearch" access="remote"
    returntype="query">
    <cfargument name="service" type="numeric"
    required="true">
    <cfargument name="city" type="numeric"
    required="true">
    <cfargument name="keywords" type="string"
    required="false">
    Select company, name, phone, city, state, username FROM
    members WHERE
    city = Form.City AND state = Form.state AND keywords LIKE
    Form.keywords
    ORDER BY company ASC
    <cfreturn ServiceResults>
    </cffunction>
    </cfcomponent>
    Do I invoke the component from the results page?
    Well, I need to solve the first issue before I attempt the
    second. Thanks!
    Wally Kolcz
    Developer / Support
    ProjectProofing.com

    Yes you can put <cfif ...> statements inside a
    <cfquery...> tag to
    modify the SQL string.
    WHERE this = that AND
    <cfif len(trim(form.something))>
    AnotherThing = '#form.something#'
    </cfif>
    Is valid.
    Whether the form variables on the action page are URL or FORM
    depends on
    the method of your <form ...> tag. method="post"
    creates form variables
    on the action page, method="get" creates URL variables on the
    action page.
    You write <cfargument ...> tags for each argument you
    want to pass into
    a function.
    <cfargument name="city" required="true" ...>
    OR
    <cfargument name="foobar" required="false" default=""
    ...>
    You then use these in the function with the arguments scope.
    #arguments.city# and #arguments.foobar#
    You then pass these into the function from your calling page.
    There are
    numerous ways this can be done, here are a few.
    <cfinvoke .... city="Sacramento" foobar="george"/>
    <finvoke ... >
    <cfinvokeArgument name="city" value="Sacramento">
    <cfinvokeArgument name="foobar" value="george">
    </cfinvoke>
    <cfset myComponent =
    createObject("component","my.component.path.andName)>
    ...myComponent.aFunction("Sacramento","george")...
    ...myComponent.aFunction(city:"Sacrament",foobar:"george")...o
    Wally Kolcz wrote:
    > I have a search page that has 3 possible entries.
    Service, City, & Keywords.
    >
    > Service and City are list/menus and cannot be null, but
    Keywords is a text
    > box and can be null.
    >
    > I need to write a SQL statement to take the 3 possible
    parameters and test
    > them against the database. Since the first 2 are never
    null, I can write
    > them right inside the SQL string, but how can I only
    check for the keywords
    > if there is something inside the box?
    >
    > Can I use a <cfif> statement inside the sql string
    to only check the 3rd
    > parameter if it is not NULL?
    >
    > I wrote this:
    >
    > Select company, name, phone, city, state, username FROM
    members WHERE
    > city = Form.City AND state = Form.state AND keywords
    LIKE Form.keywords
    > ORDER BY company ASC
    >
    > Also, since I am passing it from a search page to a
    results page, would it
    > be URL.City verses FORM.City, etc.
    >
    > Also would like to do this in a component and pass the 3
    variables as
    > arguments with the city and service being required and
    the keywords not.
    > However, I have no idea on what the procedure is for
    this.
    >
    > I wrote:
    > <cfcomponent>
    > <cffunction name="ServiceSearch" access="remote"
    returntype="query">
    > <cfargument name="service" type="numeric"
    required="true">
    > <cfargument name="city" type="numeric"
    required="true">
    > <cfargument name="keywords" type="string"
    required="false">
    > Select company, name, phone, city, state, username FROM
    members WHERE
    > city = Form.City AND state = Form.state AND keywords
    LIKE Form.keywords
    > ORDER BY company ASC
    > <cfreturn ServiceResults>
    > </cffunction>
    > </cfcomponent>
    >
    > Do I invoke the component from the results page?
    >
    > Well, I need to solve the first issue before I attempt
    the second. Thanks!
    >

Maybe you are looking for