PDA

View Full Version : translate to VB code


zardos
04-09-2007, 07:27 PM
How do i translate to VB code?


$sql = "SELECT mess FROM gb ORDER BY datum DESC limit 15";

//H?mta ur databas
$result = mysql_query($sql) or die(mysql_error());

while ($row = mysql_fetch_assoc($result)){
echo 'mess :&nbsp;'.$row['mess']. '&nbsp; <br />';

}


And what part should be in the template?

rjmjr69
04-09-2007, 07:48 PM
Whats it for whats it do?

zardos
04-09-2007, 07:51 PM
It connects to the database and write out the info in a while lope?

Paul M
04-09-2007, 07:58 PM
$result = $vbulletin->db->query_read("
SELECT mess FROM gb
ORDER BY datum DESC limit 15
");

$output = '';
while ($row = $vbulletin->db->fetch_array($result))
{
eval('$output.= "' . fetch_template('Your_Template') . '";');
}


"Your_Template" would be used to format each line.

The resulting variable $output can then be included in the template you are using to display the whole page.

zardos
04-09-2007, 08:18 PM
Nice, and thank you!