Try the following:
<?php
$r=mysql_query('SELECT * FROM `table` ORDER BY `num` ASC') or die(mysql_error());
$prev='';
while ($row=mysql_fetch_assoc($r)) {
if ($row['num']!=$prev) {
echo $row['num'].' ';
}
echo 'G';
$prev=$row['num'];
}
?>
Don't forget the replace 'num' with the column name.
cwarn23
Occupation: Genius
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
cwarn23
Occupation: Genius
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
So did you want php to place the contents into a pdf or did you want crystal reports in Visual Studio to create the pdf? PHP has a pdf library which can be found at http://au2.php.net/manual/en/book.pdf.php For examples on the pdf module embedded into google I would suggest a simple google search.
cwarn23
Occupation: Genius
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
<?php
$r=mysql_query('SELECT * FROM `table` ORDER BY `num` ASC') or die(mysql_error());
$prev='';
while ($row=mysql_fetch_assoc($r)) {
if ($row['num']!=$prev) {
$i=0;
echo $row['num'].'-A';
} else {
$i++;
echo strtoupper(dechex($i+10)).'';
}
$prev=$row['num'];
}
?>
cwarn23
Occupation: Genius
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
When it comes to encoding php code there are two options. You can use a free php script such as pobs and it will jumble up the code in a way that will make it impossible to read then anybody trying to edit it will be facing a nightmare. There are commercial alternatives such as ioncube where it is harder to crack because you have to buy it to gain access to the encoder. However in my opinion the free pobs is just as good.
cwarn23
Occupation: Genius
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259