title: MySQL, Query count results and display in PHP page
body: <p>I have the below query. I need to count how many items/rows are returned and then display that number on the PHP page this query is run from.   </p>
  
  <pre><code>$query1 = "
  SELECT HD_TICKET.ID as ID, 
  HD_TICKET.TITLE as Title, 
  HD_STATUS.NAME AS Status, 
  HD_PRIORITY.NAME AS Priority, 
  HD_TICKET.CREATED as Created, 
  HD_TICKET.MODIFIED as Modified, 
  HD_TICKET.CUSTOM_FIELD_VALUE10 as SLA,
  S.FULL_NAME  as Submitter, 
  O.FULL_NAME  as Owner, 
  HD_TICKET.CUSTOM_FIELD_VALUE0 as Type  
  FROM HD_TICKET  
  JOIN HD_STATUS ON (HD_STATUS.ID = HD_TICKET.HD_STATUS_ID) 
  JOIN HD_PRIORITY ON (HD_PRIORITY.ID = HD_TICKET.HD_PRIORITY_ID) 
  LEFT JOIN USER S ON (S.ID = HD_TICKET.SUBMITTER_ID) 
  LEFT JOIN USER O ON (O.ID = HD_TICKET.OWNER_ID) 
  WHERE (HD_TICKET.HD_QUEUE_ID = $mainQueueID) AND 
  (HD_STATUS.NAME like '%Open%')  
  ORDER BY ID DESC
  ";
  </code></pre>
  
  <p>Is this possible, I am not MySQL friendly. Basically if I can output the count number I can then pull that into a table for me to flash it up with PHP / HTML / CSS.</p>
  
  <p>I appreciate any help in advance thanks for your time.</p>