Hi all,
I have a price field for artwork. I need to compare {price} with other variables, but it is being used as a text, so 200 is more then 1950 now. How can I get this to be seen as an integer? Any add on for that?
All help appreciated,
Michel
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
July 19, 2011 9:38am
Subscribe [4]#1 / Jul 19, 2011 9:38am
Hi all,
I have a price field for artwork. I need to compare {price} with other variables, but it is being used as a text, so 200 is more then 1950 now. How can I get this to be seen as an integer? Any add on for that?
All help appreciated,
Michel
#2 / Jul 19, 2011 1:32pm
One thought is to upgrade to EE2 where you get a numeric field. Otherwise I seem to recall people changing the fieldtype at the database level.
#3 / Jul 20, 2011 9:35am
Thanks for the assist, Mike.
webnology, Mike is right. You’d need to manually change the field type for that field. Fairly easy to do, but make sure you back up your exp_weblog_data table before attempting.
Does that help?
#4 / Jul 21, 2011 4:31am
Hi all,
I’ve changed the db field type, but I’m still getting incorrect results. Some of my artwork (which has the same price) is showing up in the search results. Other artwork (from another artist) is not showing up. Id on’t see any difference in those 2 pieces. What could I be missing? There must be some difference between the 2 entries.
Thx for helping,
Michel
#5 / Jul 21, 2011 4:34am
IS there a way to display the generated sql?
#6 / Jul 22, 2011 3:29pm
Hi Michel,
Yes, you can enable Display SQL Queries. Please note that we can’t support manual database modifications, so in the long run your best bet is going to be to upgrade to EE 2.x which has this feature natively.