SMF Development > Applied or Declined Requests

Automatically convert Rand() to Random()

(1/3) > >>

Nibogo:
I think SMF should automatically convert Rand() inside queries to Random() (and viceversa), as Rand() is only used in MySQL throwing an error for Postgresql and SQLite. This would allow developers to just use any of those and we won't have to extract database name, see what's being used and then use the proper function for each one. As you know getting a random value is quite common for a lot of mods.

Oldiesmann:
How is this a bug? A feature request maybe, but definitely not a bug.

In any case, we simply cannot implement compatibility for every function someone might want to use. It is up to the individual mod author to ensure that their code works properly on all database systems. We will be glad to assist you with adding the compatibility yourself, but we can't go adding code to support things that SMF itself doesn't use.

Nibogo:
Yes, it's a feature but when I was in the team the feature request board wasn't monitored at all, that's why I posted that here, and I obviously know how to do it, I just think this is something that could be really useful, it requires less than 3 minutes of implementation and almost no testing, in the other hand you'd be making developing of mods a little bit easier.

Joshua Dickerson:
Nibogo, got a patch? Not saying we'd add it, but there is a possibility.

Nibogo:
No, but you could add it easily and see if it worth it

Navigation

[0] Message Index

[#] Next page

Go to full version