CodeIgniter From Scratch: Day 5
videos

CodeIgniter From Scratch: Day 5 – CRUD

This entry is part 5 of 17 in the CodeIgniter From Scratch Session
« PreviousNext »

The most requested tutorial for day five of our CodeIgniter screencast series was for an introduction to CRUD operations. We’ll review how to easily create, read, update, and delete records using CI’s active-records class.

Catch Up

Day 5: CRUD Operations


Tags: Videos
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • Ricardo “mAiN_iNfEcTiOn” Machado

    Hi dwds.

    Nice post. I’ve been working with CI for a while and I’ve started using like that – in the native way – but then I discovered the code crafter.

    Basically Code Crafter is a CRUD generator, that makes your life easier by creating the Models and basic CRUD system (almost like scaffolding) by only checking your database.

    Code Crafter’s Guide – http://www.datacraft.co.za//software/codecrafter_user_guide.pdf

    Code Crafter’s Page – http://www.datacraft.co.za/site/products/codecrafter

    • http://gravityfx.org/ emcgfx

      Thank you, will try this as well. Did not know about this on :)

  • http://webjawns.com/ Chris Strosser

    I’d like this site much better if there were text-only versions of the screencasts. I personally don’t have time to sit through a screencast and would really like to read some of the screencast series you have. It’s much easier to scan…

    • begs

      For me it’s much better to understand when watching a tut.

    • http://tutorial-city.net/ Tutorial City

      I think it would be nice to have both versions. Maybe the video is not playing and you cannot follow the tutorial because there is no text version.

  • Rahul

    Thanx a lot Jeff. I wanted this download option since i first saw u’r jquery tutorials. It would be great if u could provide a way to download all u’r older videos…

  • arnold

    doh!..I wish there was a part 2 for day 5
    CRUD operations are so good…

    In Day 1,2,3,4 and upcoming screencast
    …Please provide the video to be downloaded, thanks

    keep the CI screencast coming!..Thanks Jeff

  • ricardino

    Great tutorial, i really look forward to the next one every week. Requests for next week:
    A padded out update function (making it more like an edit function)
    and the basics of user authentication although is probably running before i can walk.

    Once again great tutorial, really laying things out in an understandable way.

  • Shishant

    Hello,

    Would love to see if you record it more frequently rather than a week.

    Its so awesome that waiting for a week is a pain.

  • http://www.mateussouza.com Mateus Souza

    Great post! Great screencast! Great Website!!

  • C.44

    A basic login system would be great. Some more complex queries would be great too, (joins and stuff ;))

    All in all this was a great tut, i’m having a little bit of trouble seeing how this code is going to end up showing a blog like you showed in the first screencast, but i love the fact that we can ask for certain topics to be discussed.

    Keep it up Jeffrey

  • awake

    check out Yii Framework guys

    http://www.yiiframework.com/ (the framework)

    http://www.yiiframework.com/yii-sites/ (sites powered by yii)

  • C.44

    A simple login routine would be great. I also love the fact that we can request subjects, although i don’t see this turning into a blog by episode X (10).

    Btw, i can’t find this one on iTunes yet.

  • Cecily

    I must be missing something. I’m working through this tutorial (I’m up to 16 minutes in) and when I go to look in the database to see if the “content” has been added to the database, all I see is a number 0, not the content I actually entered into the field. What am I doing wrong? Everything else seems to work.

    Thanks for any help you can provide.

    • Ricardo “mAiN_iNfEcTiOn” Machado

      That must be a problem on how you are obtaining the data….

      Probably you should check the lines where you get the post data. Something like:

      $this->input->post(‘object_name’); :) ok?

  • http://phil-cook.com Phil cook

    @jeff firstly can I say love the series so far. I have been Reading a lot of books about oo php and the mvc pattern but didn’t know where or how to start implimenting this. So thanks.

    Just a little request I like to watch these videos on my iPhone, can you provide a link in the articles to an iPhone friendly version? Many thanks.

  • http://www.zarpio.co.nr Khalil

    Video link is not downloading nor playing online… what to do?

    • http://www.zarpio.co.nr Khalil

      Finally I have download the file Thanks…

  • http://WWW.MarcelMarnix.Com Marcel

    Hello Jeff, I want to learn more in depth form/database handling with relational databases.

    For example: 3 tables, Person, Communication, CommunicationKind.

    A person can have multiple Communications(Telephone,Fax,E-mail).

    When Selecting a person in a table row, It would be nice a sub-table to show up with communications which could be added or edited. With the possibility to select the communicationkind with a dropdown box.
    And when the communicationkind isn’t in the dropdown box, add a new one and after adding being able to select the new item.

    I am looking forward to see your new CAST
    KEEP UP THE GOOD WORK ;)

  • C.44

    Any idea when the new one (ep.6) will be available ? Waiting impatiently here haha. I’d also love to see a (simple) login/user management script.

    Gotta love that we can actually ask for what we’d want to learn, gives it that much more depth. Anyway, keep it up loving these couple of series (this and the wordpress series ;))

  • Shishant

    http://rapidshare.com/files/273951422/CodeIgniter_From_Scratch-_Day_5.mp4_downloadOnly_true

    rapidshare link, after download rename it to anything you link making sure you keep the extension as .mp4

  • Alex

    Very good tutorials for CodeIgniter,great job 10000X .

    I like the site too!
    Regards,
    Alex

  • http://www.schultzstudio.com Chris

    Hey Jeff another excellent CI tutorial. Anyway you could mix some jQuery with one? Maybe show some AJAX with it?

    Keep up to good work.

  • http://www.nukleo.fr Erik

    Just a quick message to say thank you for ALL of your tutorials and especially this CI series! Got me rebuilding my portfolio with CI :)

    topics I’m looking forward to seeing :
    - internalisation (interface parts as well as contents)
    - file upload (single and multiple with validation)
    - login in / user management

    for those interested I found an awesome and extremely simple template library that allows to easily build common sections of a website (like the header and footer parts) -> http://maestric.com/doc/php/codeigniter_template

  • Aliex Freez

    Good tutorials

    How about Jquery Ajax load content to view

  • http://danijelblog.wordpress.com/ Danijel

    What I would like to see in Day 6 is how to build a tagging system where you can tag your posts/images/pages/whatever, search by tags and show related stuff.

    I think it’s better than doing login system because it goes deeper in more complex SQL queries (I think, I never did one :) which are much harder to learn than code a login system.

    Than do login system in Day 7, and please, do it with privileges, to show us how we can restrict some users access to certain admin area parts.

    Because, there are bunch of login system tutorials out there and they are very easy to apply on CI. I built normal login system, I believe, that is secure, by just using CI User Guide and little of logic :).

    It’s time go much more complicated I think now when we are already in day 6.

    • Anthony F. Camilleri

      I second completely – if you could show us an AJAX tagging system it would be beyond great!

  • http://www.zarpio.co.nr Khalil

    Dear Jeff,

    Please share next post with CI + jQuery Pagination.

    Thanks,

  • http://www.benoitvilliere.com Benoit

    Thanks Jeff. Again, next tutorial would be nice if you digged into your Authentication library of choice, wether it be TankAuth or DX_Auth… I actually would like to know what’s your favourite auth library for CI because you opinion counts… There are many, I’m about to choose DX but I’m not sure if it’s the best?

    Thanks for the great work, and thank you Envato for bringing so much energy making the world a better place for learning

  • Bryan Lewis

    How much would it cost to get one on one php/codeigniter classes. Mostly just php classes. I have a good grasp on things but I want a better understanding These tuts are amazing and are helping out a great deal! Would someone at nettuts be willing to do that er no?

  • Guillermo Carrion

    When is the next one coming out? :-)

  • Chaky

    Can’t wait for the next series! Thanks a lot!

  • http://www.madbreadband.com Slatron

    Took me a while, but I finally got the time to go through this tut. I’ve been using CI for a while now – but I really like seeing someone else step through the basics as a foundation refresher.

    I’d like to see a lesson on URL segment Rewriting with CI.

    Thanks for all the hard work, Jeffrey

  • http://www.encoder2002.com Daniel Sitnik

    Hi Jeff, thanks for the screenscats, they’re great!!

    For day 6 I’d like some tips on how to create a good and flexible site structure using CI. What I mean is how can I divide things in sections (views probably) like header, content and footer and load these sections dynamically.

    Thanks and keep up the good work!

  • http://openskymedia.com Jason Shultz

    I would have loved to see some attention giving to Update. I think that’s where a lot of us have been having issues with it. Create and Delete are fairly simple, IMO whereas Update is the tricky one to implement. Please devote some time to the next tut to Update.

  • Ryan

    Great videos. I’d love to see some best practices for CI regarding ‘templates.’ That is, what’s the best way to load a common Header, Footer, etc? Should this be done in the controller or in the views? Thanks!

  • http://danijelblog.wordpress.com/ Danijel

    When the next day is coming?

  • ibura

    it version still ain’t up?

    • ibura

      itune version

  • http://www.mcgoo.pl McGoo

    Jeff when we can expect next part ???

  • Gautam

    Is this podcast available for download to iTunes. I have subscribed for Nettuts podcasts in iTunes, but unable to receive this video.

    Regards

  • Bryan Lewis

    Jeff, I want to learn about CodeIgniter’s Template Parser Class, and how to use it with the CMS we are going to create. Is this possible?

  • kaloop

    This Series is great!

    For the next screencast I think it’ll be good to show us how to build a good login system with different levels of security (Like Administrator, Newser, Member, etc).

    Thanks for this good screencast!

  • Martin

    Question for the more experienced CodeIgniterers: would you use a templating system like Smarty in conjunction with a CI-driven site, or does CI have features that make Smarty redundant?

    I am new to both and want to know if I should learn both.

  • Michael

    Dying to get started with these tutorials.

    Already planned out a little project.

    Is there a .mov version available?

    Many thanks, Jeff.

  • http://plasaponsel.com donie

    Thanks!
    your videos really help me a lot.
    i’m going to build my new website using CI

  • Bart

    The screencast doesn’t load. Nor can you download it. Help?

  • Eduardo

    Video doesn´t work

  • Steven

    Hi Jeff, Thanks for the video tutorial and it have help me a lot in learning CodeIgniter. I try to download the video for lesson 5 but couldn’t find the link. Can you please put up the video??
    Thanks…

  • Steven

    Hey Jeff, thanks for the wonderful tutorial on CodeIgniter. I really learn so much from your video. I am trying to download the Day 5 tutorial but the links is broken. Is it possible for you to upload it??
    Thanks a lot…

  • Balazs Csaba

    Hey all…
    the video doens’t seem to work, nor the download link…
    Please, could anybody provide a link to the video…please

    Thx very much

  • Blunk

    The video its gone??? 404 Not Found :S

  • Karl Ballard

    Hey Jeff,
    I have loved the series so far, however there isn’t a copy of this to download or on iTunes avalible. This flash player doesn’t seem to co-operate.

    Many Thanks
    Karl Ballard

  • http://bleh.spooky.cl/ Mario Hernandez

    Nop, can’t watch the video either, same thing with day 6 :(

  • John Ressing

    Is this video ever going to be fixed? The download doesn’t work, and the video won’t play on the site.

  • Circoloco

    I know I’m a bit behind the times but only recently stumbled upon this. Am I blind as I cant see the down load button? Been through itunes and this and day 6 are both missing? My system is that poor and old then all I get really is audio though streaming.

  • walter

    Hi
    do I have something wrong in this file?

    id”, $row->title); ?>

    It seems like anchor() is no working in my site. Any idea why?