![]() |
multidimensional array from database table
I am having trouble getting multiple rows from a table to display.
This is where i am currently at... In my plugin php code i have the following: Code:
// This will be in the form of page.php?do=action&user=1 Code:
<tr> I am pretty sure this has something to do with making a multidimensional array, but i am not sure how exactly to do this. I have trolled multiple php and vb sites but none of them give me enough to know how to do this when pulling multiple rows with multiple fields from a database. What I am looking to do is something like: Code:
<vb:each from="?" value="?"> // This will create a new row for each row of data collected Code:
char_array( |
You are using query_first which will only get you one row of data. You need to do a query_read in order to get all the rows.
|
ah, ty for that. i changed that, but it is still not working properly.
Like i said, I am unsure how to structure the php code and the template code properly. i have tried multiple ways, and will keep trying to find an example/tutorial/etc on what im trying to do, but any help on the structure or what i'm doing wrong is appreciated. ---------------------------- EDIT: User Solved ---------------------------- PHP Code: Code:
$rkc_allchar = $vbulletin->db->query_first(" Code:
<vb:each from="rkc_charlist" value="char"> |
Have you tried doing a search in the default vbulletin files for some code that is an example of what you want?
|
i posted my solution as an edit to my last post. Thanks for the help!
|
Thanks for posting the solution and I'm glad you got it figured out. :)
|
All times are GMT. The time now is 08:41 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|