:: Forum >> Version 1 >>

Links in MySQL results (PHP)

How can I add links to MySQL SELECT results? I use slightly changed code from examples:


$query "SELECT CC_Title as Title, CMS_Tree.CT_Id as Id, CMS_Tree.CT_Name as Name FROM CMS_Tree INNER JOIN CMS_Contents ON (CMS_Tree.CT_ContentId = CMS_Contents.CC_Id) WHERE  CMS_Tree.CT_Parent = '1'";

$connection mysql_connect("localhost""user""password");

$data mysql_query($query$connection);

So I have 3 columns, but I'd like to add link like edit.php?id=$row[CT_Id] to the first column, i.e. CC_Title, and not to show the column with Id's.

I've found a post with the same problem (http://www.activewidgets.com/javascript.forum.2816.2/link-mysql-php.html), but I can't understand where to add this code.
Celer Nautilus
Wednesday, March 23, 2005

This topic is archived.

Back to support forum

Forum search