If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Using Mysql & PhpRunner how to create a report.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-21-12, 04:47
kirankumer kirankumer is offline
Registered User
 
Join Date: Jan 2012
Location: pune
Posts: 16
Angry Using Mysql & PhpRunner how to create a report.

Hii Guys...

This is my first post on this nice site..

I'm using PHP Runner to create report for below query.....


SELECT
Username,
date,
cast(group_concat(punch_time) as char) AS punches
FROM attendance
GROUP BY Username
ORDER BY date


Output looks like this...

Username | Date | punches

1) kiran 2012-01-20 09:00:10 , 09:10:15, 10:15:10,......

These punches i want to show on report page like this...

Username | Date | first_punch | second_punch | third_punch | fourth_puch ....
1) kiran 2012-01-20 09:00 10:09 10:15 10:15 ..............

so on as many punches as employee punches in a day ...



so is there anyway to generate columns randomly as based on my total number of punches (If i punch a total of 10 in a day it should display punches from first to ten randomly..)


Please help me guys...

Thanks ,
Kiran
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On