I'm having a difficult time getting a query to work
correctly.
I'm not sure, if this is proprietary to Dreamweaver or
not (that is what I do my application development in)

Anyway I have created a search page that is dynamic
(meaning up to the user to choose the criteria)
It all works fine provided I am only querying the main
table. Since that table is composed of some reference
integers, joins are the only way to make it effective.
ButI've tried formating as the following:
SELECT 
  `StaIndTypes`.`CareerCategories`,
  `USStates`.`States`,
  `staTaxTerm`.`TaxTerm`,.......
FROM
VendorJobs`, `USStates, `staTaxTerm`

INNER JOIN `StaIndTypes` ON (`VendorJobs`.`Industry` =
`StaIndTypes`.`CareerIDs`)
LEFT OUTER JOIN `USStates` ON
(`VendorJobs`.`LocationState` = `USStates`.`StateID`)
  LEFT OUTER JOIN `staTaxTerm` ON
(`VendorJobs`.`TaxTerm` = `staTaxTerm`.`TaxTermID`)
 
I've also tried:

moving the joins into the "where" statement
where
vendorjob.industry = staindtypes.careerids 
and
VendorJobs.LocationState = USStates.StateID

Neither works inside the page - though the both work
as just a straight query to the database.

I'm not sure, myabe the code is broken somewhere else,
but if I just put that one table in there
select * from vendorjobs (it adds this):
"SELECT * FROM VendorJobs $MM_whereConst $whereClause
order by PostStart desc"

I am not sure what the $MM_whereConst or %whereClause
is , or what it should contain.  
So , after many hours of trying various things I
thought I'd throw it out here and see if anyone
understands.

Stuart

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to