Ask a Question related to Dreamweaver AppDev, Design and Development.
-
DennisMcDougall #1
How to filter one database query by another
What I am hoping to do is filter one database query by another. I have two
databases and they both have a field call vehicle_type. What I want to happen
is that vehicle_type from the products database filters what is shown from the
accessories database. These are my SQL queries SELECT * FROM products WHERE
id = %s', SELECT * FROM accessories WHERE vehicle_type='''; I think the
accessories query should look like SELECT * FROM accessories WHERE
vehicle_type=''$vehicle_type'; but I don't know how to give $vehicle_type a
value from the products database. Hope this makes sense, any help would be
greatly appreciated. Thanks Dennis :0)
DennisMcDougall Guest
-
#40499 [NEW]: filter sapi does not register any highlightning filter
From: php at henke37 dot cjb dot net Operating system: any PHP version: 6CVS-2007-02-15 (CVS) PHP Bug Type: Apache2 related... -
Filter Query
ok i have this <cfset mypdf = "name"> <cfset mypdf = GetToken(mypdf, 1, "_")> <cfoutput>#mypdf#</cfoutput> <cfset session.fkcliente = "name"> ... -
Filter by MshORAddresses in an LDAP query
I am trying to query an LDAP server, and search for part of a string within the mshORAddresses field. This field is a string that is comma delimited... -
Dynamic Query Filter
I have a query which returns a very long list of my members, and would like to create a select box at the top of the page that allows the user to... -
Query Filter
I have a salesman who mostly reports information outside of the US, but occasionly, he will put in a report for a company in the US. He also needs... -
CMBergin #2
Re: How to filter one database query by another
Join the tables in a single recordset. A basic outline (don't use SELECT
*):
SELECT P.ProductField1, P.ProductField2, A.AccessoryField1,
A.AccessoryField2, etc, for all the fields you need
FROM products P INNER JOIN accessories A ON P.vehicle_type=A.vehicle_type
WHERE P.id=%s
"DennisMcDougall" <webforumsuser@macromedia.com> wrote in message
news:d0dv6i$g7t$1@forums.macromedia.com...two> What I am hoping to do is filter one database query by another. I havehappen> databases and they both have a field call vehicle_type. What I want tothe> is that vehicle_type from the products database filters what is shown fromWHERE> accessories database. These are my SQL queries SELECT * FROM productsa> id = %s', SELECT * FROM accessories WHERE vehicle_type='''; I think the
> accessories query should look like SELECT * FROM accessories WHERE
> vehicle_type=''$vehicle_type'; but I don't know how to give $vehicle_typebe> value from the products database. Hope this makes sense, any help would> greatly appreciated. Thanks Dennis :0)
>
CMBergin Guest



Reply With Quote

