Reputation: 37
If possible I want to create a non-existent field in a MySQL view.
Say select * from authors
Then, if there is a field living and it is 1, I want to add a field image
and assign it a value of tick.gif
. Is this possible?
It is so I can easily use a rather flash grid program!
Upvotes: 0
Views: 103
Reputation: 566
you can try
select a.*, if(a.living = 1, "tick.gif", NULL) as image from authors a
Upvotes: 1