The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
How would I go about doing this?
I've tried the below to give me an array but it results in a fatal error. PHP Code:
|
|
#2
|
|||
|
|||
|
what your array code look like
you need to fetch through the results |
|
#3
|
|||
|
|||
|
I've fixed the fatal error issue. But the following isn't working. It should print out the array but it isnt'.
PHP Code:
|
|
#4
|
|||
|
|||
|
while($post = $vbulletin->db->fetch_array)
|
|
#5
|
|||
|
|||
|
That returns mysqli_result Object ( ).
|
|
#6
|
|||
|
|||
|
i had this problem on one of my plugins and thats how i fixed it
PHP Code:
|
|
#7
|
|||
|
|||
|
That's what returns mysqli_result Object ( ).
|
|
#8
|
|||
|
|||
|
weird i didn't know vbulletin has mysqli methods.. could be wrong
its best practice to use $vbulletin-> if your using db-> always fixes most of my problems when i put it in |
|
#9
|
|||
|
|||
|
In the following code, $threadid is an array with the contents of a single database row.
Code:
$threadid = $vbulletin->db->query_first("
SELECT threadid
FROM " . TABLE_PREFIX . "thread
WHERE pollid = '".$pollida."'
");
Code:
$checkpost = $vbulletin->db->query_read("
SELECT username
FROM " . TABLE_PREFIX . "post
WHERE threadid = ".$threadid['threadid']."
|
|
#10
|
|||
|
|||
|
Ahhh^
I should have known that! Thanks Marco. ---- PHP Code:
I thought the above code would work. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|