The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
K guys, i've managed some of my coding ok so far but now im seriously stuck and need lots of help :ermm:
I've got a separate page based on the forum style which is a quarter-mile timechart. I need to populate a table with the contents of a database and havnt a clue how to do it ![]() basically the table in the template has 3 columns, Username, Car, Quarter-mile time. The database table (it's a separate mysql database) has one table "quartermile" which has 4 fields which are 1. "ID", Int, auto-incremented, primary field 2. "username", varchar, 3. "car", varchar 4. "qttime", Decimal I just need to get the entire content of that DB table displayed on a table on my site (it's my test site so cock-ups/errors wont cause any harm). Any assistance will be immensely appreciated as i've been working on this all day, every day for the last week and seem to be getting nowhere fast. Many thanks ------------------------------- EDIT ------------------------------------ OK, worked out how to retrieve the data from the database just need some instruction on how to get the data into a table properly ![]() Anyone???? all i want to do is retrieve all rows and put them in a table |
#2
|
|||
|
|||
![]()
^Bump
The only thing that's holding me back from going any further is not getting the data from the DB into the table. Surely someone must know how to do this? |
#3
|
|||
|
|||
![]()
It will depend on if you will be using vB Templates or plain html from your php-script.
|
#4
|
|||
|
|||
![]()
Basic setup would be:
PHP Code:
|
#5
|
|||
|
|||
![]()
I'm going to use the template rather than just in HTML as it would look better that way (i hope) that's the bit i couldnt figure out, if i were doing it in just php and outputting as html i'd make a loop for the number for total rows in the DB but how would i do the equivalent and get it into the template?
|
#6
|
|||
|
|||
![]() PHP Code:
'mydatabit': Holeding the detail lines, maybe something like: Code:
<tr><td>Username: $myrow[username]</td><td>Car: $myrow[car]</td></tr> |
#7
|
|||
|
|||
![]()
Thankyou ever so much
![]() ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|