Welcome Guest, Not a member yet? Register   Sign In
$this->table->set_heading() with row numbering?
#2

[eluser]Otemu[/eluser]
Hi,

You could use the technique listed here

Example of the technique:
Code:
SELECT emp_id, lname, fname, job_id,
(SELECT COUNT(*) FROM employee e2 WHERE e2.emp_id <= e.emp_id AND e2.job_id = 10) AS rownumber
FROM employee e
WHERE job_id = 10
ORDER BY emp_id

In your model you could add count and then just return the rownumber column in your view


Messages In This Thread
$this->table->set_heading() with row numbering? - by El Forum - 06-06-2012, 09:26 AM
$this->table->set_heading() with row numbering? - by El Forum - 06-07-2012, 04:22 AM
$this->table->set_heading() with row numbering? - by El Forum - 06-07-2012, 05:15 AM
$this->table->set_heading() with row numbering? - by El Forum - 06-07-2012, 05:53 AM
$this->table->set_heading() with row numbering? - by El Forum - 06-07-2012, 06:07 AM
$this->table->set_heading() with row numbering? - by El Forum - 06-07-2012, 06:09 AM
$this->table->set_heading() with row numbering? - by El Forum - 06-07-2012, 06:15 AM
$this->table->set_heading() with row numbering? - by El Forum - 06-07-2012, 12:17 PM
$this->table->set_heading() with row numbering? - by El Forum - 06-08-2012, 12:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB