thanks so much. something so simple. Just couldnt find an example. The splat was just a lazy way to get it to work then fine tune it later. Now that it works I will pare it down. Thanks so much. Robert P. Reil Managing Director, Motorcyclecarbs.com, Inc. 4292 Country Garden Walk NW Kennesaw, Ga. 30152 Office 770-974-8851 Fax 770-974-8852 <http://www.motorcyclecarbs.com/> www.motorcyclecarbs.com
_____ From: Jasun [mailto:[EMAIL PROTECTED] Sent: Saturday, May 05, 2007 11:26 AM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Q of Q? Is this what your trying to do? <cfparam name="Form.OrderNumber" default="1"> <cfquery name="THEORDER" datasource="carbs"> SELECT * FROM orders, shipments WHERE orders.OrderNumber = <cfqueryparam cfsqltype="cf_sql_varchar" value="#FORM.OrderNumber#" maxlength="40" /> and orders.order_id = shipments.order_id </cfquery> <cfdump var"#THEORDER#"> It's not a good idea to use a splat ( * ) in this query. you will need to specify the fields by name. On 5/5/07, Robert Reil <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: I am trying to pull data from 2 tables 1) seach by order number the ORDERS table, and Query ORDER_ID 2) search the SHIPMENTS table for the above resultant ORDER_ID's I have built this code so far. <cfparam name="Form.OrderNumber" default="1"> <cfquery name="order" datasource="carbs"> SELECT * FROM carbs.orders, carbs.shipments WHERE OrderNumber = <cfqueryparam cfsqltype="cf_sql_varchar" value="#FORM.OrderNumber#" maxlength="40" /> </cfquery> Im a bit gray on how to show the result of the second search in my cfquery. Should the results be in one cfquery, or two of them? Whould there be an or in the WHERE Statement? I also am trying to use a cfdump to output the results of this query but am a bit lost as to where to have it build that. Robert P. Reil Managing Director, Motorcyclecarbs.com <http://motorcyclecarbs.com/> , Inc. 4292 Country Garden Walk NW Kennesaw, Ga. 30152 Office 770-974-8851 Fax 770-974-8852 <http://www.motorcyclecarbs.com/> www.motorcyclecarbs.com -- -jasun ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform <http://www.acfug.org?fa=login.edituserform> For more info, see http://www.acfug.org/mailinglists <http://www.acfug.org/mailinglists> Archive @ http://www.mail-archive.com/discussion%40acfug.org/ <http://www.mail-archive.com/discussion%40acfug.org/> List hosted by FusionLink <http://www.fusionlink.com> -------------------------------------------------------------