I'd suggest you ask that question of the others...
it wont work in MySQL, so I'm mystified as to how it allegedly works for others
thats why I suggest you look at da manuel
run your queries in say MySQl query browser to prove they work before putting the query in code. that way round you will know whether its your sql, your code or possibly something else. if you don't validate your own code and sql it makes it tough for you and others to diagnose where problems lie.
but the again the words after the limit look more like a ragbag of PHP functions as if the code has been sloppily cut & paste/lifted from a PHP site.