Matthew1980 - 8:10 pm on Aug 2, 2010 (gmt 0)
Hi there Sub_Seven,
Enum field syntax is structured as such: enum("0","1") [dev.mysql.com ]
This means that the database will only have a value of (in this case) 1 or 0, and you can specify it to be a default value. Then when you want to update the cell, you just specify the value as you want ie; 1 or 0, and if you try to put a 2 or 3, the default value will then be used :) Hope that makes sense.
The only reason I asked if it was enum was because it sounds like you want to display html depending on the value of that field, enums are usefull to clear up ambiguity of data to I find - it either one or the other, but you can theoretically have lots of options, I generally stick to just the 2 (but it can be situation dependant) for logged in (1) or out (0) then check that against a cookie - there are other methods, I just prefer that...
To be honest it's easier to edit your mysql through phpmyadmin, I try to avoid command line, as you can do lots of damage with a wrongly constructed statement...
>>Is it necessary that for the field to be enum in order for this script to work?
No it's not 'necessary' but it's advantageous IMO that's all.
I didn't mean to confuse the issue there, It just sounded the logical choice to me :)