[CDBI] sql function as column

"Jason Bodnar" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
I have a table with just two columns - id int auto_increment and name
varchar(255). I'd like to have a third "virtual" column called code. The SQL
for retrieving all three columns would be:

select id, name, conv(id,10,36) as code from table where name = ?

conv is a (possibly mysql-only) function that converts the first argument from
the base second arg to base third arg. (In this case it converts the id from
base 10 to base 36).

Is there a way to do this with CDBI?

--
Jason Bodnar
[email protected]
http://www.shakabuku.org

UnWired Buyer. The best way to win on eBay. Period.
http://www.unwiredbuyer.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.