The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#3
|
||||
|
||||
![]()
KirbyDE has really helped me out and we got to this point:
<?php $username="dbusername"; $password="dbpassword"; $database="dbname"; mysql_connect('localhost',$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $randgetq=mysql_query("SELECT * FROM tablename ORDER BY RAND() LIMIT 1"); if (!$randgetresults=mysql_fetch_array($randgetq, MYSQL_ASSOC)) { echo "Sorry no entries"; } else { print_r($randgetresults); } mysql_close(); ?> It is almost perfectly The small thing is that on the website when it prints the random entry from the table, it is also prints part of the code in the print output - ie/ it prints "array ( [tablefield] => 5456 )" when I just want it to print "5456" or any other random entry from the table) Do you know why this might be or how I can stop it and just have the field entry printed? My vB version is 3.0.8 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|