Calibur Victorious Calibur Victorious -4 years ago 132
MySQL Question

phpmyadmin column using php function

Can i make a column that automatically creates its content from other column and do a function on it?

for example a function to lowercase the title in same row

function tt(row['title']){
strtolower(row['title']);
}


[id title content function tt()]
[1 Awesome PHP Lorem row['title']]

//becomes//

[id title content function tt()]
[1 Awesome PHP Lorem awesome php ]


is that possible? Or do i have to make it is supposed to be while inserting the database?

Answer Source

yes you can use triggers to achieve this.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download