The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
SQL Query Syntax
Hi!
I'd like to ask about this: https://www.vbulletin.com/docs/html/...ards_sql_query Is that syntax still valid in VB5? I'm trying to port some things I did back in VB4 to VB5 and this seems not to work at all. If that syntax is still valid, can anyone give me some example of simple php code/widget that will do some reading from DB please? Thank you! |
#2
|
||||
|
||||
Unfortunately that syntax isn't going to work at all
If you take a look at any of our released vB5 mods, you'll find a file /upload/core/packages/<packagename>/db/mysql/querydefs.php where complex queries are stored. You then need to use the DB Assertor similar to this: Code:
$data = vB::getDbAssertor()->getRows('DBTechAjaxThreads:getDataForCache-' . $tableShort, array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_STORED), false, $keyField); Code:
$nodes = vB::getDbAssertor()->getRows('vBForum:node', array( vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_SELECT, vB_dB_Query::COLUMNS_KEY => array('nodeid', 'lastupdate'), vB_dB_Query::CONDITIONS_KEY => array( array('field' => 'starter', 'value' => $nodeid, 'operator' => vB_dB_Query::OPERATOR_EQ) ) )); Hope that helps Fillip |
3 благодарности(ей) от: | ||
PSiggy, RichieBoy67, Zachery |
#3
|
||||
|
||||
Yves wrote some documentation on it. Perhaps it is over on vbulletin.com
|
#4
|
|||
|
|||
Thank you for the reply!
|
#5
|
|||
|
|||
I need the code to pull something from a part of the database and display it under username in vbulletin.
Any help would be great! Thx |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|