The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Custom Pages Pulling From Database
I'm not really sure how to describe what I am looking for. I learned that what I had tried to do was not possible. Basically, I tried to use php within a vbphrase and within a template. Turns out I can't do that. I'm looking for a way that I can easily specify what I would like to pull from the database. Specify a table, the fields, and all that fun stuff. Think someone can think something up?
Here's an example of what I tried to do... Code:
<table align="center" border="1" cellspacing="1" cellpadding="1"> <?PHP $dbhost = 'localhost'; $dbuser = ''; $dbuserpassword = ''; $dbname = ''; $tablename = ''; $conn = mysql_connect("$dbhost", "$dbuser", "$dbuserpassword") or die(mysql_error()); mysql_select_db("$dbname",$conn) or die(mysql_error()); $result = mysql_query("SELECT * FROM $tablename"); while($query_data = mysql_fetch_row($result)) { echo "<tr><td width=125>", $query_data[1],"</td>"; echo "<td>", $query_data[4],"</td></tr>"; echo "<tr><td colspan=2>", $query_data[2],"</td></tr>"; echo "<tr><td colspan=2>", $query_data[3],"</td></tr>"; } ?> </table> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|