4 posts by 2 authors in: Forums > CMS Builder
Last Post: August 20, 2008   (RSS)

By terryally - August 20, 2008 - edited: August 20, 2008

Good morning from England.

I just want to pass some code by you to get your advice and correct an error message.

The scenario is that I have set up a Lunch Menu using the Multi-record menu type. The menu has Starters, Main Course, Desserts, and Bar - all of which I want to list in each category on the same page. I could not find any instruction about how to achieve this so I assigned the SELECT call as a variable first as illustrated in the code section below.

It works. But I am still getting the error message:
Notice: Undefined variable: lunch_menuRecords in /home/lakesideint/www/www/menu.php on line 6
Notice: Undefined variable: lunch_menuRecords in /home/lakesideint/www/www/menu.php on line 14

The undefined variables to which it refers are $main and $starter

How do I correct this?

P.S. My test page is http://lakesideint.server266.com/menu.php

$main = $lunch_menuRecords;

list($main, $lunch_menuMetaData) = getRecords(array(
'tableName' => 'lunch_menu',
'where' => 'course="Main"',

$starter = $lunch_menuRecords;

list($starter, $lunch_menuMetaData) = getRecords(array(
'tableName' => 'lunch_menu',
'where' => 'course="Starter"',


Re: [terryally] 'Where' clause validation

Problem solved.

Please ignore.

Re: [terryally] 'Where' clause validation

By Donna - August 20, 2008

Hey Terry! Glad to hear you got that sorted out -- thanks for sharing! :)