This topic is locked

Grabbing info from another table to print

5/10/2011 3:23:08 AM
PHPRunner General questions
S
swanside author

How can I get this to work?
I have it on my view page and it works great, but I need to be able to print it from the print pages, as we can then select a lot of lines and select print selected?

Any ideas please?

Cheers

global $conn;

$sql = "select Title from material where job_no='".postvalue("editid1")."'";

$rs = db_query($sql,$conn);

$data = db_fetch_array($rs);

if(!$data)

return;

echo "<table>";

while(1)

{

echo "<tr>";

foreach($data as $v)

{

echo "<td>";

echo htmlspecialchars($v);

echo "</td>";

}

echo "</tr>";

if(!($data = db_fetch_array($rs)))

break;

}

echo "</table>";
G
Grissom 5/10/2011

Hi,
I guess you will have to tweak the print.php file in your PHPRunner directory (in there look for "sources") manually. I had some similar issue with the export page and applied some changes to the export.php which works just great.
The drawback is that those changes will effect all projects as those files are used to populate the output folder when building a project.
Chris