Log in

View Full Version : Missing Type for Variable Error



pschlimgen
02-06-2007, 07:42 PM
I'm using Dreamweaver for my company's website. I have page that I'm query MySQL to return company listings based on a customers location.

The following SQL works fine and I get no errors...

SELECT *
FROM vendors
WHERE vendors.CO = colname
ORDER BY vendors.vendor_name

But as soon as add other locations like this:

SELECT *
FROM vendors
WHERE vendors.CO = colname OR vendors.NM = colname OR vendors.UT = colname OR vendors.AZ = colname
ORDER BY vendors.vendor_name

Dreamweaver gives me a "Missing Type for Variable:colname" and won't accept the SQL.

I've gotten this before, and for some reason I think I fixed it by changing something in my "Remote Site" server information inside Dreamweaver. Any ideas??

Twey
02-06-2007, 07:58 PM
What happens when you execute the query directly using a normal MySQL client?

blm126
02-06-2007, 08:46 PM
I'm using Dreamweaver for my company's website.
That's your first problem, as Twey says check the SQL statement directly against MySQL. Use something like PhpMyAdmin or preferably the Mysql command line program.