Here is a nice dataset for our database. I've done the typing already so there is no reason for you to do it. Besides, it's an excuse to exercise our phpMyAdmin skills. So poke at: db download and put it someplace you will remember. Open phpMyAdmin and select tutorial_db then Structure. Empty the tables. The tables need to exist and be empty for the next part to work. Import the file tutorial_db.xml.zip. Scroll down and click Go. This should complete successfully and give you 147 items and 13 item_menus. This is much easier than typing.
You might want to look at the file in the download. It is in our old friend XML and completely human readable. After the first few entries it gets pretty boring.
Stuff the following in index.php in the appropriate spot. With the code you have, if you have imported the database data above, you should see your command select and then a generic select pointed at the db. Fiddle with it. There is a bug that you need to understand.
select_command($_POST); // construct global commands check_tables(); // check to see that tables present select_generic('item',$_POST,'all'); // we need tables for this to work. echo "You should see:
";
echo "<br />";
Sigh.