Hi Terry
Thanks for posting.
Let's take a look at how to setup a "where" statement with your code.
First off, my recommendation is to actually use three different "getRecords" so you can have one list for each course.
Next, let's suppose the code generator gives you the following:
// load record from 'meals'
list($mealsRecords) = getRecords(array(
'tableName' => 'meals',
'loadUploads' => true,
'allowSearch' => false,
'limit' => '1',
));
Here's how you'd add a "where" to that:
// load record from 'meals'
list($starters) = getRecords(array(
'tableName' => 'meals',
'where' => "course = 'starters'", // load starters
'loadUploads' => true,
'allowSearch' => false,
'limit' => '1',
));
Note: I'm assuming your table name is called "meals" so many sure to update that if it's something else instead.
See the "where" in that?
To take this to the next step, you can duplicate that block twice more (giving you a total of 3).
Make sure to adjust the "Where" part so it loads the right course. Also, make sure to change the variable name for "$starters". You can use $mains and $desserts.
Does this all make sense?
Let me know any questions.
Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/