MARCO1 |
09-23-2012 12:17 AM |
Quote:
Originally Posted by nhawk
(Post 2367722)
In vB 5 you should be using...
PHP Code:
vB::getDbAssertor()->update('node', array('approved' => '0'), array('nodid' => $nid));
Not...
PHP Code:
mysql_query("UPDATE node SET approved = '0' WHERE nodeid = '$nid'");
|
I know how to do that via vB Assertor "There's a full tutorial about it within the alpha team" It will be visible to the public when vB5 goes Gold and for sure there's some more great tutorials will be released to all of the developers as well.
Quote:
Originally Posted by nhawk
(Post 2367722)
You will run into problems on many Nginx servers using the later method.
The vb 4 equivalent was only mentioned because many Nginx servers have trouble if you don't use the $vbulletin->db->... and use a straight mysql query in a mod's code.
|
That's technically not possible as I told you, vBulletin is also use mysql_query() function there's no innovative in vBulletin database class, There's no way ever to make a mysql query without using mysql_query() and that's how vBulletin database assertor make a query to database, It's use mysql_query() so how it will not make a problem with vBulletin and will make a problem with modifications.
In other hand, Since 5 minutes ago, To make things very clear with me I was discussing this with a vBulletin Developer, Which is said the same thing, He's never heard about any issues with nginx about that.
P.S : There's a benefit to use a direct straight mysql_query in your mods, If you are working in a huge project like vBFoster pro, Instead of upgrading the database structure every time vBulletin changing it, You have two options :
1- Build your own project database class. "Which is done for the vBFoster Pro version"
2- Use mysql_query() function directly.
So when vBulletin release a new updated code base, You will just need to change the template display code and phrases no more :)
You can safely use mysql_query() in any of your modification in vBulletin :up:
|