This is the entire function:
Code: Select all
function displayAsTables() {
// echo $this->_sql;
$sql = mysql_query($this->_sql);
if (mysql_num_rows($sql) == 0) {
echo "No results found";
return;
}
echo "<table border='2' tablecolor=black>\n<tr>\n";
$fieldCount = mysql_num_fields($sql);
for ($i = 0; $i < $fieldCount; $i++) {
echo "<th>" . mysql_field_name($sql, $i) . "</th>\n";
}
[b] echo "<th>Links</th></tr>\n";[/b]
while ($row = mysql_fetch_array($sql)) {
echo "<tr>\n";
for ($i = 0; $i < $fieldCount; $i++) {
echo "<td>" . htmlentities($row[$i]) . "</td>\n";
}
$action = str_replace("username", $row[0], $actions);
$actions = '<a href="index.php?option=com_user&view=user&Itemid=68&extuser=username">Profile</a>';
echo "<td nowrap> $action</td>\n</tr>\n";
[b] }[/b]
echo "</table>";
This is the actual table itself:

Users can link to their own profiles, this is just something to allow other people to view their profiles.