The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I need to port over the latest threadid/postid on index page from 3.0.x to 3.5.x. The code below worked fine in 3.0.x, can someone help me port it to 3.5.x? I can via paypal, please pm me.
Code:
$newestthreadidq = $DB_site->query("
SELECT threadid
FROM thread
ORDER BY threadid DESC
LIMIT 1
");
$newestthreadid = $DB_site->fetch_array($newestthreadidq);
$newestpostidq = $DB_site->query("
SELECT postid
FROM post
ORDER BY postid DESC
LIMIT 1
");
$newestpostid = $DB_site->fetch_array($newestpostidq);
$formattedthreadid = number_format($newestthreadid[threadid]);
$formattedpostid = number_format($newestpostid[postid]);
|
|
#2
|
||||
|
||||
|
If you just want that code to work with 3.5, use this:
Code:
$newestthreadidq = $db->query_read("
SELECT threadid
FROM thread
ORDER BY threadid DESC
LIMIT 1
");
$newestthreadid = $db->fetch_array($newestthreadidq);
$newestpostidq = $db->query_read("
SELECT postid
FROM post
ORDER BY postid DESC
LIMIT 1
");
$newestpostid = $db->fetch_array($newestpostidq);
$formattedthreadid = number_format($newestthreadid[threadid]);
$formattedpostid = number_format($newestpostid[postid]);
|
|
#3
|
||||
|
||||
|
Better
PHP Code:
|
|
#4
|
|||
|
|||
|
woohoo!!! thank you all
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|