Building pagination into code / using MySQL in views - help needed [newbie question] - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Building pagination into code / using MySQL in views - help needed [newbie question] (/showthread.php?tid=44286) |
Building pagination into code / using MySQL in views - help needed [newbie question] - El Forum - 08-10-2011 [eluser]Unknown[/eluser] I'm building a TV guide for my site which uses the framework; the views work great, haven't quite figured out how to use MySQL with it yet though. I'm planning to paginate sort of like this: http: library.digiguide.tv/lib/programmenextshowing/12578 This is part of the code in my view file: That's all manually entered in for now; but how could I get it to be rendered from the database and convert times from displaying as 10:00:00, 16:30:00 etc. to 10:00am, 4:30pm etc. and paginate the MySQL results so they render like in library.digiguide.tv/lib/programmenextshowing/12578 with their style of pagination? Note that my site is inspired by, but not a copy of theirs. I've got the basics of CodeIgniter working well, but need it to create a login system etc. so I can update this TV guide platform without having to manually update the data via PhpMyAdmin every time etc. Note that I'm .htaccess - protecting the login to just localhost, so deny from all should be used [I think]. This newbie needs some help; had a look on Google but not quite sure how to implement this! Cheers *can't post links though, so you'll have to manually cut-and-paste them. Building pagination into code / using MySQL in views - help needed [newbie question] - El Forum - 08-10-2011 [eluser]Unknown[/eluser] This is the code (plain HTML at the moment, but needs to be in a database with JOIN etc.): http: pastebin.com/UCGpCK2S |