All pastes #402953 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-03-20 02:30 UTC
rendered paste body
try(); {
    $q= &$conn->query(
      'select * from records where name=%s', $name
    );
}
  if(!$q->next())
  {            
     echo "error";
  }
else
  {            
echo"<label>Query OK <img src=/xml/common/image/ok-small.png></label>";
echo "<br>";
echo "<br>";   
echo "HostName Information";
echo "<table border='0' bgcolor=#FFFFFF align=center width=100%>";
echo "<tr> <th bgcolor=#009999>ID</th> <th bgcolor=#009999>Domain ID</th> <th bgcolor=#009999>Name</th> <th bgcolor=#009999>
Type</th> <th bgcolor=#009999>Content</th> <th bgcolor=#009999>TTL</th> <th bgcolor=#009999>Prio</th> </tr>";
  while ($record = $q->next())           {
        echo "<tr bgcolor=#BFFFFF><td bgcolor=#BFFFFF>";
        echo $record['id'];
        echo "</td><td>";
        echo $record['domain_id'];
        echo "</td><td>";
        echo $record['name'];
        echo "</td><td>";
        echo $record['type'];
        echo "</td><td>";
        echo $record['content'];
        echo "</td><td>";
        echo $record['ttl'];
        echo "</td><td>";
        echo $record['prio'];
        echo "</td></tr>";
 }
        }

var_dump($q);
?>