The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How grab one post ?
How can I grab one post and display in other site ?
What is question to Mysql to do it ? |
#2
|
||||
|
||||
[sql]SELECT *
FROM `INSERTTABLEPREFIXpost` WHERE `postid` = INSERTID[/sql] Make sure you replace the capitalised words. |
#3
|
|||
|
|||
thanks,
I want to connect to database and I use include("config.php") but what's next ?, which function to co-operate with it ? |
#4
|
||||
|
||||
Quote:
then $vbulletin->db is ready to go. |
#5
|
|||
|
|||
ok,
so I have: Code:
<? require("global.php"); $res = mysql_query("SELECT * FROM post WHERE postid='1111'"); $row= (mysql_fetch_row($res)); echo ($row[7]); ?> and it's display this post in other site, but when I want to add new plugin file .php with this code, forum display error: Code:
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 311296 bytes) in ............. global.php on line 472 Is it problem this code or limit ? |
#6
|
||||
|
||||
No where near enough information to answer your question, I am afraid.
the php memory limit is settable in php.ini. You wil have to restart apache once you change it. |
#7
|
||||
|
||||
You shoud be using vb's query functions, not the mysql functions.
|
#8
|
|||
|
|||
ok, I should using vb's query functions:
Code:
require("global.php"); $getposts = $db->query_read(" SELECT post.postid AS postid, post.pagetext AS pagetext FROM " . TABLE_PREFIX . "post AS post WHERE postid='1111';"); //while($post = $db->fetch_array($getposts)) $post = $db->fetch_array($getposts); echo "<b>".$post['postid']."</b> - ".$post['pagetext']."<br /><br />"; is it possible that only choose one post, take that isn't enough memory ? |
#9
|
||||
|
||||
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|