Jump to content

Increment count


shan_cool

Recommended Posts

Hi All,

My query
SELECT count(*) as serial no,Lpad(defect_id,5,0) Def_Id,proj_name,prod_name,module_name,mail_id,developer_name,def_severity,def_priority,round,def_status,
def_date,caseno,lead_mail_id,exp_out,actual_out,mod_lead_mail_id FROM dt_defect where def_status <> 'Rejected' order by defect_id";
I want the output

serial no
1
2
3
can any body help me
Thanks
shan

Link to comment
https://forums.phpfreaks.com/topic/3283-increment-count/
Share on other sites

hi,,
thanks for ur prev reply.. but when i give it like

SELECT count(*) as serial_no,Lpad(defect_id,5,0) Def_Id,proj_name,prod_name,module_name,mail_id,developer_name,def_severity,def_priority,round,def_status,
def_date,caseno,lead_mail_id,exp_out,actual_out,mod_lead_mail_id FROM dt_defect where def_status <> 'Rejected' group by defect_id order by serial_no


it shows "1" as serial no for all rows.......

rgds,
shan
Link to comment
https://forums.phpfreaks.com/topic/3283-increment-count/#findComment-11217
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.