Revision [336]

This is an old revision of CodeSnippets made by WojciechLisiewicz on 2008-01-23 17:21:55.

 

  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.  komornik varchar(75) NOT NULL,
  6.  ocena smallint(6) NOT NULL DEFAULT '0',
  7.  opinia text NOT NULL,
  8.  username varchar(75) NOT NULL,
  9.  
  10. ,\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";
  11.  
  12. // oceny komorników
  13. if ($komornik_access) {
  14.   // if POST, then DB-operations
  15.   if ($komornik_mode == "add_opinion") {
  16.     $rsstr = "INSERT INTO komornik_opinie (komornik, ocena, opinia) VALUES ('".$item."', ".$_POST["ocena"].",'".$_POST["opinia"]."');";
  17.     //wykonaj operacje na bazie
  18.    
  19.   }
  20.   // show form - on access only
  21. }
  22. // for all - show results:
  23.  
  24. $rssstr = "SELECT * FROM komornik_opinie WHERE ";
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki