I’ve created a fake table called tbl_my_father_is_not_the_neighbor:
create table tbl_my_father_is_not_the_neighbor(
id int(5) not null primary key auto_increment,
name varchar(100),
fatherId int(5),
constraint fk_fkfkfk foreign key(fatherId) references tbl_my_father_is_not_the_neighbor(id)
) Engine=InnoDB;
Now a need to create what I’m calling of “virtual column” named “fatherName” that will contain "My father’s name is " + {name of the father} or “I don’t know who’s my father” if the column fatherId is null.
The first thing is: what is the best way of make this "virtual column"?
The second thing is: Once this "virtual column" exists, I need to order my active record by "fatherName" column, for example at admin page of CRUD. Is that possible?
Thanks