Re: Links in a table in mysql



Luigi Donatello Asero wrote:
> > I wonder whether I could write links within a table at mysql as text so
> > that the user could follow  these links which would be displayed on the
> > table on the webpage.

I replied:
> I think you should try thinking for yourself and read some manuals before
> asking questions on usenet, cause your questions are getting a bit
> annoying.

Luigi replied:
Please do not answer my questions if you think that they are annoying.

I'm afraid it's too late. I already did answer your questions. Maybe if you'd try to read and understand the answers people here are giving you, you would not have to ask same questions again and again. You probably noticed that not many readers of this newsgroup have answered your questions and those who did stopped responding your further questions. Think about that and read again the replies you got, because they do answer your questions. Remember also that even if someone decides not to answer your posts, one is still forced to read ("manually" or using some news client software filters) the post header to check if it's from you or not, and even then one could see your texts in replies to your posts. So the problem is not me (or someone else) answering your questions or not answering your questions, but you asking them.

Hilarion

























As I do not like posts totally not referring to thread topic I will try to
answer your URL problem in a simplier way. It would be easier if you posted
your current code, but I'll try to do it based on previous one.

<?php
 /*
 Place proper doctype here, but USE it. This means following the rules
 of the doctype, not only placing it's declaration here.
 Check this site (it validates your webpage against the doctype declaration
 you used):
 http://validator.w3.org/check?uri=https%3A%2F%2Fwww.scaiecat-spa-gigi.com%2Fsv%2Fboende-i-italien.php
 */
?>
<html>
 <head>
   <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
 </head>
 <body>
<?php

// connecting to DB
$db = mysql_connect( 'localhost', 'user', 'password' );
if ($db===FALSE)
{
 die( 'Connection error: ' . mysql_error() );
}

// selecting database
if (!mysql_select_db( 'databas', $db ))
{
 die( 'Error selecting DB: ' . mysql_error() );
}

// executing query
$result = mysql_query(
 'SELECT Region, Ort, Sovplatser, Rum, Avstlnd_km, Terrass, Lagenhetsnummer, URL ' .
 'FROM some_table',
 $db
);
if ($result===FALSE)
{
 die( 'Error executing select statement: ' . mysql_error() );
}

// table header
?>
   <table summary="semesterbostäder" border="1" cellspacing="0" cellpadding="3">
     <caption>Semesterbostäder i Italien</caption>
     <col />
     <col />
     <col align="right" />
     <col align="right" />
     <col align="right" />
     <col align="center" />
     <col align="right" />
     <col />
     <thead>
       <tr>
         <th id="t1">Region</th>
         <th id="t2">Ort</th>
         <th id="t3">Sovplatser</th>
         <th id="t4">Rum</th>
         <th id="t5">Avstlnd till havet i km</th>
         <th id="t6">Terrass</th>
         <th id="t7">Lägenhetsnummer</th>
         <th id="t8">URL</th>
       </tr>
     </thead>
     <tbody>
<?php

// fetching results
$indent = '        ';
while ( $mycolumn = mysql_fetch_array( $result, MYSQL_NUM ) )
{
 echo $indent . "<tr>\n";
 for ( $i=1; $i <= 7; $i++ )
 {
   echo $indent . '  <td headers="t'.$i.'">';
   echo htmlspecialchars( $mycolumn[$i] );
   echo "</td>\n";
 }
 echo $indent . '  <td headers="t8">';
 echo '<a href="' . htmlspecialchars( $mycolumn[8] ) . '">';
 echo htmlspecialchars( $mycolumn[8] );
 echo '</a>';
 echo "</td>\n";
 echo $indent . "</tr>\n";
}
?>
     </tbody>
   </table>
 </body>
</html>

.



Relevant Pages

  • Re: /proc/cpuinfo mistake
    ... > The original posts by Mr. Connor are quite interesting. ... That webpage is the work of a spammer who used: ... Spammers and trolls HATE Challenge-Response Systems because they ...
    (comp.os.linux.misc)
  • Re: Threads keep disappearing into cyberspace??
    ... knew that the person who helped would get recognition for it (those bronze, ... In fact the webpage is just a newsreader. ... For viewing historical posts, you can use http://groups.google.com; ... "advanced search" option and search in a specific group (Google's been having ...
    (microsoft.public.access.forms)
  • Re: Sponsoring FreeBSD
    ... Boris did the right thing IMO by pointing at the donations pages. ... He wanted banner/logo advert on mine webpage. ... Many of your posts in response to questions carry what ...
    (freebsd-questions)
  • Re: Thanks Dave, I can use your last post to help prove continued defamation.
    ... I go by what you've written and your webpage. ... Do those escorts see your posts on here? ... I don't drink. ...
    (misc.transport.trucking)