Hello. I have been stuck on this one for a while. I need to create a link based upon a query. I need to read an entire row from a table, display just 3 of the fields, and make one of the fields clickable. I need to have the results of this click be that the script would read the entire row from the table that has that field as the unique identifier linked to the click. Here is the snippet from the code that actually works to display the data thus far:
$query = 'SELECT u.username, p.ProjID ,p.UserID , p.OrigUserID , p.ProjName , p.ProjOriginal , p.ProjType , p.ProjDesc , p.ProjFile , p.ProjDate FROM #__projects p , #__users u WHERE p.ProjName = p.ProjOriginal AND p.UserID = u.id LIMIT 0, 30 ';
// prepare the query in the database connector
$database->setQuery( $query );
// retrieve the rows as objects
$row = $database->loadObjectList();
foreach ($row as $row) {
$passproj = urlencode($row->ProjName);
echo '<table width="100%" border="2" cellspacing="0" cellpadding="0" bgcolor="#84BBD9" bordercolor="#400000">';
echo ' <tr>';
echo ' <td width="40%"><font face="Arial" color="#000000"> ' . $row->ProjName . ' </td>';
echo ' <td width="25%"><font face="Arial" color="#000000"> ' . $row->username . ' </td>';
echo ' <td width="33%"><font face="Arial" color="#000000"> ' . $row->ProjDate . ' </td>';
echo ' </tr>';
echo '</table>' ;
}
This produces a neatly formatted table showing 3 fields, which depends upon 2 criteria being equal. This script works. Now, I need to make the 'ProjName' field into a clickable link, since the script lists out all the rows of the table until it reaches the end. The script only displays unique rows which it identifies as 'Original' project fields based upon the two criteria. So, I need to somehow, make a point in each row, that the user will be able to click on, and have the script go on to pull that individual row of fields from the table, and display just that row in what I would call the 'detail view'. I am stuck on this, please anyone, help!
Thanks
Ice