rendered paste body<?php
// Connects to your Database
mysql_connect("localhost", "root", "ilovedb!") or die(mysql_error());
mysql_select_db("thestandcompany") or die(mysql_error());
$data = mysql_query("SELECT * FROM tsc_menu WHERE menutype = 'mainmenu' and 'published' = 1") or die(mysql_error());
Print "Connected to Mysql";
if (mysql_num_rows($data) == 0) {
echo "Empty result" ;
exit ;
}
Print "<table border cellpadding=3>";
while($info = mysql_fetch_array( $data ))
{
Print "<tr>";
Print "<th>id:</th> <td>".$info['id'] . "</td> ";
Print "<th>name:</th> <td>".$info['name'] . " </td></tr>";
}
Print "</table>";
?>