Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article

To: RobertClark; cuban leaf; InterceptPoint; smith288; 21stCenturion; sand88; Haddit; 2ndamendmentpa; ..

Edit Items:

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:

52 posted on 02/22/2012 1:25:41 PM PST by Mycroft Holmes (<= Mash name for HTML Xampp PHP C JavaScript primer)
[ Post Reply | Private Reply | To 51 | View Replies ]


To: RobertClark; cuban leaf; InterceptPoint; smith288; 21stCenturion; sand88; Haddit; 2ndamendmentpa; ..
The last line of that bit of code needs to be:
	echo "<br />";

Sigh.

53 posted on 02/22/2012 1:39:00 PM PST by Mycroft Holmes (<= Mash name for HTML Xampp PHP C JavaScript primer)
[ Post Reply | Private Reply | To 52 | View Replies ]

Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson