[rt-users] Attachments

Darrin Walton darrinw at nixc.net
Wed Jan 30 18:31:20 EST 2002


  |+ Define 'divided into multiple pages' ?  To me, a HTML 'page' is everything
  |+ from the opening <HTML> to the closing </HTML>  (or end of connection).

Our Sales Management Software uses crystal reports, which has the ability 
to print in HTML format.  Invoices, Sales Orders, etc that are 'multiple 
pages'.  From looking at the raw HTML, the pages are divided by <HTML> 
</HTML> tags.

  |+ 'Multiple pages' that are somehow in one attachment would indicate that
  |+ the user is doing something weird.  I suspect you're referring to multiple
  |+ attachments.  ( Terminology is important )

Nope.  See above.  Single Attachment.

  |+ > RT clearly knows about both pages (giving the user the option of page 1
  |+ > or page 2) but regardless of which one they select, it only displays page
  |+ > 1.
  |+ 
  |+ Yup, Attachments.  Are you certain that they are different?  Actually, try
  |+ this (in SQL) to see whether they are different (replace 'ticketID' with
  |+ the number of the ticket with the problem).
  |+ 
  |+ 	SELECT count(distinct(at.Content))
  |+ 	FROM Attachments as at, Transactions as tn
  |+ 	WHERE at.TransactionId = tn.id AND
  |+ 	tn.Ticket = 'ticketID';
  |+ 
  |+ vs
  |+ 
  |+ 	SELECT count(at.Content)
  |+ 	FROM Attachments as at, Transactions as tn
  |+ 	WHERE at.TransactionId = tn.id AND
  |+ 	tn.Ticket = 'ticketID';
  |+ 
  |+ If the numbers don't add up, you've got *exactly* duplicate attachments
  |+ somewhere.  If they do match up, you got different contents in each
  |+ Attachment.

mysql> SELECT count(distinct(at.Content))
    -> FROM Attachments as at, Transactions as tn
    -> WHERE at.TransactionId = tn.id AND
    -> tn.Ticket = '93';
+-----------------------------+
| count(distinct(at.Content)) |
+-----------------------------+
|                           2 |
+-----------------------------+
1 row in set (0.04 sec)

mysql> SELECT count(at.Content)
    -> FROM Attachments as at, Transactions as tn
    -> WHERE at.TransactionId = tn.id AND
    -> tn.Ticket = '93';
+-------------------+
| count(at.Content) |
+-------------------+
|                 2 |
+-------------------+
1 row in set (0.00 sec)

--darrin





More information about the rt-users mailing list