jump to navigation

Illegal to use Mac Opera? June 24, 2007

Posted by Olexandr Melnyk in : Fun, Web , add a comment

As someone has pointed out on the Opera-Users mail list, from the license of Opera 9.21 for Macintosh:

“You may not use the Software on non-PC products, devices, or embedded in any other product…”

So are all Mac users infringing the license? ;)

Technorati Tags: ,

Using views with variables in MySQL June 18, 2007

Posted by Olexandr Melnyk in : Databases , add a comment

One of MySQL’s restriction when using views is that they cannot refer to local variables. So, for example, this statement will produce an error:

create view thematical_books as
select title
     , author
  from books
 where subject = @book_subject


A workaround for this limitation is quite simple: to use a function which returns variable value. For example:

create function book_subject
returns varchar(64) as
return @book_subject;

create view thematical_books as
select title
     , author
  from books
 where subject = book_subject()

Technorati Tags: , , , ,