<?php
mysql_connect("localhost", "root", "pass") or die (mysql_error ());
mysql_select_db("test") or die(mysql_error());
mysql_query('SET NAMES utf8');
$strSQL = "SELECT * FROM apps";
$rs = mysql_query($strSQL);
while($row = mysql_fetch_array($rs)) {
echo '<a href="acc.php?id=';
echo '' . $row['id'] . '"class="acc-num">';
echo 'ОА' . $row['id'] . '';
}
mysql_close();
?>