Forum Moderators: open
For Example:
adtraAttributeID = (int & primary key)
attributeName = (int forgien key refering to a list of all the additional attributes in another table)
attributeValue = the actual value of that attribute.
The problem is that the values are sometimes strings, sometimes numbers. Since i store them all as varchar's thats not really a problem until i want to query them. Is there a way to query a varchar but treat it as a number?
Thanks,
Ryan
eg, if your column is varchar(50), say
You should do something like this
SELECT * FROM mytable WHERE mycolumn='123'
NOT
SELECT * FROM mytable WHERE mycolumn=123
Although it may be the case that the mySQL engine will implicitly convert to a varchar, I'd never assume that.