CodeIgniter Forums

Full Version: new to everything
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to figure out a CMS and was drawn towards grocery/CI. I went through the tutorials just fine but they use things like function _example_output which I think is in example.php. Maybe some other stuff. As I try to make my own DB and such, the examples make calls to those things but they are never discussed in the tutorials, they just call it. Is there a tutorial that starts from scratch and builds something useable?

This one is called the simplest but its calling another script. what if I wanted to use it for say cars?

function offices()
$output = $this->grocery_crud->render();


Do I need to wrap it in anything? where do I save the file. How do I call it from a browser?
Sounds like you need to go back and read some of the more general CI examples. All your page logic functions go in a controller file.. then the routing system of CI takes


and runs Directory::offices() from /application/controllers/directory.php

I found the intro examples got me from "huh?? what goes where?" to app development in about 20 mins.

Good luck!

I have not heard of Grocery CRUD, but it sounds like it's a third-party library. CRUD stands for CReate, Update, and Delete. It's the basic operations of putting data into a database. It might be better to just learn a little Codeigniter first, without any additional extras.

Like whiteatom says, your URL might look like this:

When you try to go to that URL, Codeigniter will interpret that as "look for the file Cars.php in the controllers folder, then execute the show_specs() function in that file, and give it the value of 42 (which is probably the database ID for a particular car)."

If you're new to programming and PHP as well, check out these tutorials.
I just did the tuts and I have a meh idea on how it works but there is so much going on in the example. Any chance you could rip out all the example files and do the one line tutorial so I can look at the structure without all the fluff.
Ryan, are you talking about plain Codeigniter or Grocery CRUD? They are two different things. Most of us can help you with Codeigniter questions, but Grocery CRUD questions, well, they require someone who uses and knows Grocery CRUD.
sorry, I was referring to grocery. I'm new to CI too so this is a learning curve for seems to be a ridiculously simple way of making interactive databases without the back end stuff. It is looking very promising for rapid development so I am trying to figure it out. I just started with fresh CI files and grocery files and going to try to figure this out. I just noticed the lessons in the tutorial makes up the file that was causing the most headache so I am going to start removing functions one by one and try to reveal the core.