Revision [335]

This is an old revision of CodeSnippets made by WojciechLisiewicz on 2008-01-23 16:37:24.

 

  1. $item = zmienna przekazywana w action {{komornik item="$item"}}
  2.  
  3. $new_table = "CREATE TABLE komornik_opinie (
  4.  id int(10) unsigned NOT NULL auto_increment,
  5.  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";
  6.  
  7. // oceny komorników
  8. if ($komornik_access) {
  9.   // if POST, then DB-operations
  10.   if ($komornik_mode == "add_opinion") {
  11.     $rsstr = "INSERT INTO komornik_opinie (komornik, ocena, opinia) VALUES ('".$item."', ".$_POST["ocena"].",'".$_POST["opinia"]."');";
  12.     //wykonaj operacje na bazie
  13.    
  14.   }
  15.   // show form - on access only
  16. }
  17. // for all - show results:
  18.  
  19. $rssstr = "SELECT * FROM komornik_opinie WHERE ";
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki