Revision [335]
This is an old revision of CodeSnippets made by WojciechLisiewicz on 2008-01-23 16:37:24.
- $item = zmienna przekazywana w action {{komornik item="$item"}}
- $new_table = "CREATE TABLE komornik_opinie (
- id int(10) unsigned NOT NULL auto_increment,
- name varchar(30) collate utf8_bin NOT NULL,\n `firstname` varchar(30) collate utf8_bin NOT NULL,\n `town` varchar(50) collate utf8_bin NOT NULL,\n `area` varchar(10) collate utf8_bin NOT NULL,\n `pagename` varchar(50) collate utf8_bin NOT NULL,\n `username` varchar(75) collate utf8_bin NOT NULL,\n `latest` enum('Y','N') collate utf8_bin NOT NULL default 'N',\n PRIMARY KEY (`id`)\n) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_bin";
- // oceny komorników
- if ($komornik_access) {
- // if POST, then DB-operations
- if ($komornik_mode == "add_opinion") {
- $rsstr = "INSERT INTO komornik_opinie (komornik, ocena, opinia) VALUES ('".$item."', ".$_POST["ocena"].",'".$_POST["opinia"]."');";
- //wykonaj operacje na bazie
- }
- // show form - on access only
- }
- // for all - show results:
- $rssstr = "SELECT * FROM komornik_opinie WHERE ";