Hi
I have produced a page which successfully produces a pdf document using php/mysql and TCPDF. I now want to add some formatting and one other field out put and I can’t seem to get it to work.
I have a table - documents - which is related to another table called parties connected by a field idcode. Within the documents table there are fields - transday, transmonth and transyear which vary for each document. Each document can have 2 or more parties.
The part of the code which extracts the data I currently use is:
mysql_select_db($database_process, $process);
$result3 = mysql_query("SELECT parties.docid, GROUP_CONCAT(party SEPARATOR ‘<br>’) AS partylist, documents.doctitle
FROM parties INNER JOIN documents ON parties.docid=documents.docid
WHERE parties.idcode = ‘$appidpassed’
GROUP BY parties.docid
");
and the part of the pdf generation that loists this is:
while($row = mysql_fetch_array($result3))
{
$htmlcontent .= $row[‘doctitle’].“<br />”.$row[‘partylist’].“<br /><br />”;
}
The output is of the format:
Document title 1
Party1
Party2
Party3
Document title 2
Party4
Party5
Party6
What I would like is for the document title to be bold and for the date - eg Concat(transday,’ ‘,transmonth,’ ',transyear) AS docdate - to be at the end of each separate party list (ie in the example above on the line after Party3 and on the line after Party6.
Whatever I try seems to fail. Any suggestions please?