The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Array Help
Hello I am trying to create an array to list the results that it finds from the MySQL DB using the SELECT command.
Here is my code basically, im new to vBulletin + PHP. Code:
$theuserid = $vbulletin->userinfo['userid']; $result = $vbulletin->db ->query_read("SELECT * FROM vsa_advreg_invite WHERE inviter='$theuserid'"); while($row = $vbulletin->db->fetch_array){ $getcode = "You invited: " . $row['invited']. "<br> Your Code to Give: ". $row['code'] . "<br>"; } |
#2
|
|||
|
|||
I think you're close, you just need the while line to be
Code:
while($row = $vbulletin->db->fetch_array($result)){ |
#3
|
|||
|
|||
I gave that a shot as well but still no luck. With that code it came out to be like
Code:
$theuserid = $vbulletin->userinfo['userid']; $result = $vbulletin->db ->query_read("SELECT * FROM vsa_advreg_invite WHERE inviter='$theuserid'"); while($row = $vbulletin->db->fetch_array($result)) { $getcode = "You invited: " . $row['invited']. "<br> Your Code to Give: ". $row['code'] . "<br>"; } |
#4
|
||||
|
||||
Quote:
Try this: PHP Code:
|
#5
|
|||
|
|||
That fixed it Dead Eddie! Makes since now as to what you said ^_^ Thanks a lot!!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|