Getting distinct rows from table with count

<?php $result =  $this->db->query("SELECT ticket_code,COUNT(*) as count FROM total_tickets_private GROUP BY ticket_code ORDER BY count DESC;")->result();

  <td><?=$res->ticket_code ?></td>
    <td><?=$res->count ?></td>

?>

Comments

Popular posts from this blog

reactjs questions part 4

ReactJS: How and when to force a React component to re-render

Q: Error Boundary in React that catches an error and displays a fallback UI