![]() |
Need Help With Form Submission - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Need Help With Form Submission (/showthread.php?tid=50229) Pages:
1
2
|
Need Help With Form Submission - El Forum - 03-20-2012 [eluser]vincej[/eluser] Read you - At the at the time of the initial presentation of the dates ie before the amendments are made, a SELECT is done of the DB with a GROUP_CONCT So that the dates can be pivoted from columns to rows. Does it not follow that if I am to keep track of the individual puid's then I need to get rid of the group Group_Concat as well. If I do then I need to figure out how to pivot the data. Here is the original SELECT : Code: SELECT `location`, lo.locationid, GROUP_CONCAT( pd.dates Need Help With Form Submission - El Forum - 03-20-2012 [eluser]CroNiX[/eluser] Probably just need to add something to your select() like: Code: GROUP_CONCAT( pd.guid ORDER BY pd.dates ) AS TheGUIDs Need Help With Form Submission - El Forum - 03-21-2012 [eluser]vincej[/eluser] Hi CroxNix - I am embarrassed to say that after trying umpteen different permutations I still can not make my query work. Yes, I know that this is not CI but none of my sources know how to make a double group_concat work with a join. What I have got doesn't work properly. I get all the dates, all the PUIDs adn only 1 location: Code: ThePUID TheDates location My (faulty ) query so far is: Code: SELECT could you please be so kind as to help out here ? Many thanks ! Need Help With Form Submission - El Forum - 03-21-2012 [eluser]vincej[/eluser] HI again - It Looks Like I have success!! It's a been a pig though ! I resorted to my old fashioned 'where' clauses rather than the more current joins ( yes I am that old ! ) and it all fell into place :o) check it out ! Code: SELECT group_concat(p.puid ORDER BY p.dates) AS ID, location, l.locationid, group_concat(p.dates ORDER BY p.dates) as Dates Many Thanks !!!! |