Does mysql have anything like an atoi()
function?.....IE some low-level way to
interpret a string as an int?
I'm working on a simple table-based imitation
of semistructured data, where everything is
a string. But some strings need to be
interpreted as integers.
create table attribute
(
attr_id int primary key auto_increment,
label VARCHAR(48),
value VARCHAR(48),
data_type VARCHAR(32),
etc....
)
so I want to be able to say:
select attr_id, value from attribute
where label = 'GAIN'
and data_type = 'INTEGER'
and value > 100
order by value
.....and have the > 100 work
like the unix shell command sort -n