¯¸ªø³¡¸¨®æ - lutuni ªº¤é»x |
![]() ![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
![]() ![]() |
|
![]() |
||
³Ì·sªº¤é»x
¤ÀÃþ: SQL SERVER
§@ªÌ: lutuni (11:38 am)
|
¤ÀÃþ: SQL SERVER
§@ªÌ: lutuni (4:35 pm)
|
![]() ³q¹L¤WzªºÀˬd¡A ![]() ¦bÀˬd¹LÀô¹Ò«á´N¬O¿ï¾Ün¦w¸Ëªºª©¥»¡C ¸Õ¥Î¡A¨º»ò´N¿ï¾Ü§K¶Oªºª©¥»¡C¦³§Ç¸¹«h¿é¤J§Ç¸¹¡C ![]()
![]() ª©¥»¿ï¾Ü«á¡A¸g¹L¤F±ÂÅv±ø´Ú¡A±µ¤U¨Ó·|¥ý¦w¸Ë¤@¨ÇSQL Server¦w¸Ë®É»ÝnªºÀɮסC ¦Ó¦w¸Ë¤ä´©Àɮפ]¦P®É·|ÃѧO¦b¦w¸Ë¹Lµ{ÁÙ¦³¨º¨Ç·|¾ÉP¦w¸Ë¥¢±Ñªº¦]¯À¦s¦b¡A ![]() ¦bè誺¤ä´©Àɮצw¸Ë¤§«á¡A¥i¥H¬Ý¨ìªí¦C¥X©ÒÀˬdªº¶µ¥Ø¤ñè誺¦h¤F¡C ![]() Y³£³q¹L¡A¨º»ò±µ¤U¨Ó´N¶}©l¿ï¾Ün¦w¸Ëªº¶µ¥Ø¥H¤În¦w¸Ëªº¥Øªº¦ì¸m¡C ![]() ±µ¤U¨Ó¬O°õ¦æÓÅ骺³]©w¡A¦pªG¥»¾÷¤¤¬O·s¦w¸Ëªº¡A¨º»ò·íµM´N¬O¿ï¹w³]°õ¦æÓÅé´N¦æ¤F¡C ![]() Åã¥ÜªÅ¶¡ªº®e¶q¤j¤p ![]() ¤U¤@¨B¤§«á´N¬O¦øªA¾¹²ÕºA¡A³oùØn³]©w¨C¤@ÓªA°Èªº±Ò¥Î±b¤á¡A ![]() ¥H¤Uªºµe±¬O³]©w¤§«áªº¡A ¥t¤@Ó¶ÅÒ©w§Ç¡A«h¤£°µ¥ô¦óªº§ó°Ê¡C ![]() ¸ê®Æ®w¤ÞÀº²ÕºA¡C ![]() Analysis Services²ÕºA¡A¦P¼Ë¦b³o¨à¦Ü¤Ö¤]n¿ï¾Ü¤@¦ì«ü©wªº¤Hû¡C ![]() Reporting Services²ÕºA¡A¦bFoundation Server¤¤¤@©w·|¨Ï¥Î¨ìReporting Service¡A¦bTeam Foundation ªº¦w¸Ë«ü¤Þ¤¤´£¨ì¦b³o¨à¬O¿ï¾Ü¡u¦w¸Ë¦ý¤£³]©w³øªí¦øªA¾¹¡v¡A¦]¬°¦w¸ËTeam Foundationªº¹Lµ{¤¤´N·|¥h³]©w³øªí¦øªA¾¹¤F¡C ![]() ¦A¨Ó¬O¿ù»~³ø§i¤è¦¡¡A³o¸Ì§Ú̪½±µ¿ï¾Ü¤U¤@¨B¡K¡K
![]() ¦b¸g¹L¤Wzªº³]©w¤§«á¡ASQL 2008·|¦b°µ¤@¦¸Àˬd¡A³o¦¸¬O°w¹ï¤§«e©Ò¿ï¾Üªº¦w¸Ë¶µ¥Ø¡C¦P¼Ëªº¦bÀˬd¤§«á·|µ¹²M³æªí¦C¦UÓ¶µ¥ØªºÀˬdµ²ªG¡C ![]() ¨ì³oùØSQL 2008 Server¤v¸g§¹¦¨©Ò¦³ªº·Ç³Æ¤u§@¡C ![]() ¨S¦³¤°»ò°ÝÃDªº¸Ü¡A´Nª½±µ«ö¤U¡i¦w¸Ë¡j¡A¯u¥¿¶}©lSQL 2008ªº¦w¸Ë§a¡C ![]() ![]() §¹¦¨¡I ![]() ¾ãÓ¦w¸Ë¹Lµ{¨ä¹ê«Ü²³æ¡A¥Dn¦b¹Lµ{¤¤ªº¤@¨Ç¶µ¥Ø¦³³q¹LÀˬdªº¸Ü´N¨S¤°»ò°ÝÃD¤F¡C
![]()
![]() |
¤ÀÃþ: SQL SERVER
§@ªÌ: lutuni (10:59 am)
|
¬d¸ß«È¤á SELECT * FROM [Leader].[dbo].[COPMA] ¬d¸ß¼t°Ó SELECT * FROM [Leader].[dbo].[PURMA] |
¤ÀÃþ: SQL SERVER
§@ªÌ: lutuni (1:46 pm)
|
UPDATE table SET field1=value1, field2=value2 WHERE condition_field=condition_value ¨ÑÀ³¼t°Ó¸ê®Æ§ó§ï¸ê®Æ ¥I´Ú±ø¥ó¡GPAY12 ¥[¤u¶O¥Î¬ì¥Ø¡G5522 À³¥I±b´Ú¬ì¥Ø¡G2143 À³¥I²¼¾Ú¬ì¥Ø¡G2121 µ²±b¤é´Á¡GÓ¤ë³{25¤é UPDATE [DEMO].[dbo].[PURMA] SET [MA025]='·í¤ë²¼60¤Ñ',[MA055]='PAY12',[MA042]='5522',[MA041]='2143',[MA043]='2121',[MA035]='25' UPDATE [Leader].[dbo].[PURMA] SET [MA025]='·í¤ë²¼60¤Ñ',[MA055]='PAY12',[MA042]='5522',[MA041]='2143',[MA043]='2121',[MA035]='25' «È¤áÀÉ¸ê®Æ§ó§ï¸ê®Æ ±b´Ú¬ì¥Ø:1143 ²¼¾Ú¬ì¥Ø:1121 UPDATE [DEMO].[dbo].[COPMA] SET [MA047]='1143',[MA074]='1121' UPDATE [Leader].[dbo].[COPMA] SET [MA047]='1143',[MA074]='1121' §ó§ï¹ô§O «È¤á 1. UPDATE [Leader].[dbo].[COPMA] SET [MA014]='NTD' WHERE [MA014]='NT$' 2. UPDATE [Leader].[dbo].[COPMA] SET [MA014]='USD' WHERE [MA014]='US$' ¼t°Ó 1. UPDATE [Leader].[dbo].[PURMA] SET [MA021]='NTD' WHERE [MA021]='NT$' 2. UPDATE [Leader].[dbo].[PURMA] SET [MA021]='USD' WHERE [MA021]='US$' ²£«~ UPDATE [Leader].[dbo].[INVMB] SET [COMPANY]='Leader',[CREATOR]='DS',[USR_GROUP]='0000',[CREATE_DATE]='20120419',[FLAG]=1 |
¤ÀÃþ: SQL SERVER
§@ªÌ: lutuni (1:34 pm)
|
SQL»yªk°Ñ¦Ò¤â¥U(SQL) DB2 ´£¨Ñ¤FÃö³s¦¡¸ê®Æ®wªº¬d¸ß»y¨¥ ¢á¢ß¢Ú (Structured Query Language)¡A¬O¤@ºØ«D±`¤f»y¤Æ¡B¬J©ö¾Ç¤S©öÀ´ªº»yªk¡C¦¹¤@»y¨¥´X¥G¬O¨CÓ¸ê®Æ®w¨t²Î³£¥²¶·´£¨Ñªº¡A¥Î¥Hªí¥ÜÃö³s¦¡ªº*§@¡A¥]§t¤F¸ê®Æªº©w¸q¡]¢Ò¢Ò¢Ú¡^¥H¤Î¸ê®Æªº³B²z¡]¢Ò¢Û¢Ú¡^¡CSQLì¨Ó«÷¦¨SEQUEL¡A³o»y¨¥ªºì«¬¥H¡§¨t²Î R¡§ªº¦W¦r¦b IBM ¸t²ü¦è¹êÅç«Ç§¹¦¨¡A¸g¹LIBM¤º³¡¤Î¨ä¥Lªº³\¦h¨Ï¥Î©Ê¤Î®Ä²v´ú¸Õ¡A¨äµ²ªG¬Û·í¥O¤Hº¡·N¡A¨Ã¨M©w¦b¨t²ÎR ªº§Þ³N°ò¦µo®i¥X¨Ó IBM ªº²£«~¡C¦Ó¥B¬ü°ê°ê®a¼Ð·Ç¾Ç·|¡]ANSI¡^¤Î°ê»Ú¼Ð·Ç¤Æ²Õ´¡]ISO¡^¦b1987¿í´`¤@Ó´X¥G¬O¥H IBM SQL ¬°°ò¦ªº¼Ð·ÇÃö³s¦¡¸ê®Æ»y¨¥©w¸q¡C ¤@¡B¸ê®Æ©w¸q ¢Ò¢Ò¢Ú¡]Data Definition Language) ¸ê®Æ©w»y¨¥¬O«ü¹ï¸ê®Æªº®æ¦¡©M§ÎºA¤U©w¸qªº»y¨¥¡A¥L¬O¨CÓ¸ê®Æ®wn«Ø¥ß®ÉԮɺ¥ýn±¹ïªº¡AÁ|¤Z¸ê®Æ¤Àþ¨Çªí®æÃö«Y¡Bªí®æ¤ºªº¦³¤°麽Äæ¦ì¤¸¥DÁä¡Bªí®æ©Mªí®æ¤§¶¡¤¬¬Û°Ñ¦ÒªºÃö«Yµ¥µ¥¡A³£¬O¦b¶}©lªº®ÉÔ©Ò¥²¶·³W¹º¦nªº¡C ¢°¡B«Øªí®æ¡G CREATE TABLE table_name( column1 DATATYPE [NOT NULL] [NOT NULL PRIMARY KEY], column2 DATATYPE [NOT NULL], ...¡^ »¡©ú¡G¡@ DATATYPE --¬O¸ê®Æªº®æ¦¡¡A¸Ô¨£ªí¡C NUT NULL --¥i¤£¥i¥H¤¹³\¸ê®Æ¦³ªÅªº¡]©|¥¼¦³¸ê®Æ¶ñ¤J¡^¡C PRIMARY KEY --¬O¥»ªíªº¥DÁä¡C ¢±¡B§ó§ïªí®æ¡@ ALTER TABLE table_name ADD COLUMN column_name DATATYPE »¡©ú¡G¼W¥[¤@ÓÄæ¦ì¡]¨S¦³§R°£¬YÓÄæ¦ì¤¸ªº»yªk¡C ALTER TABLE table_name ADD PRIMARY KEY (column_name) »¡©ú¡G§ó§ïªí±oªº©w¸q§â¬YÓÄæ¦ì³]¬°¥DÁä¡C ALTER TABLE table_name DROP PRIMARY KEY (column_name) »¡©ú¡G§â¥DÁ䪺©w¸q§R°£¡C ¢²¡B«Ø¥ß¯Á¤Þ¡@ CREATE INDEX index_name ON table_name (column_name) »¡©ú¡G¹ï¬YÓªí®æªºÄæ¦ì¤¸«Ø¥ß¯Á¤Þ¥H¼W¥[¬d¸ß®Éªº³t«×¡C ¢³¡B§R°£¡@ DROP table_name DROP index_name ¤G¡Bªº¸ê®Æ§ÎºA DATATYPEs smallint 16 ¦ì¤¸¤¸ªº¾ã¼Æ¡C interger 32 ¦ì¤¸¤¸ªº¾ã¼Æ¡C decimal(p,s) p ºë½TÈ©M s ¤j¤pªº¤Q¶i¦ì¤¸¾ã¼Æ¡Aºë½TÈp¬O«ü¥þ³¡¦³´XÓ¼Æ(digits)¤j¤pÈ¡As¬O«ü¤p¼Æ ÂI«á¦³´X¦ì¼Æ¡C¦pªG¨S¦³¯S§O«ü©w¡A«h¨t²Î·|³]¬° p=5; s=0 ¡C float 32¦ì¤¸ªº¹ê¼Æ¡C double 64¦ì¤¸ªº¹ê¼Æ¡C char(n) n ªø«×ªº¦r¦ê¡An¤£¯à¶W¹L 254¡C varchar(n) ªø«×¤£©T©w¥B¨ä³Ì¤jªø«×¬° n ªº¦r¦ê¡An¤£¯à¶W¹L 4000¡C graphic(n) ©M char(n) ¤@¼Ë¡A¤£¹L¨ä³æ¦ì¬O¨âÓ¦r¤¸ double-bytes¡A n¤£¯à¶W¹L127¡C³oӧκA¬O¬° ¤F¤ä´©¨âÓ¦r¤¸ªø«×ªº¦rÅé¡A¨Ò¦p¤¤¤å¦r¡C vargraphic(n) ¥iÅܪø«×¥B¨ä³Ì¤jªø«×¬° n ªºÂù¦r¤¸¦r¦ê¡An¤£¯à¶W¹L 2000¡C date ¥]§t¤F ¦~¥÷¡B¤ë¥÷¡B¤é´Á¡C time ¥]§t¤F ¤p®É¡B¤ÀÄÁ¡B¬í¡C timestamp ¥]§t¤F ¦~¡B¤ë¡B¤é¡B®É¡B¤À¡B¬í¡B¤d¤À¤§¤@¬í¡C ¤T¡B¸ê®Æ*§@ ¢Ò¢Û¢Ú ¡]Data Manipulation Language) ¸ê®Æ©w¸q¦n¤§«á±µ¤U¨Óªº´N¬O¸ê®Æªº*§@¡C¸ê®Æªº*§@¤£¥~¥G¼W¥[¸ê®Æ¡]insert)¡B¬d¸ß¸ê®Æ¡]query¡^¡B§ó§ï¸ê®Æ¡]update) ¡B§R°£¸ê®Æ¡]delete¡^¥|ºØ¼Ò¦¡¡A¥H¤U¤À §O¤¶²Ð¥L̪º»yªk¡G ¢°¡B¼W¥[¸ê®Æ¡G INSERT INTO table_name (column1,column2,...) valueS ( value1,value2, ...) »¡©ú¡G 1.Y¨S¦³«ü©wcolumn ¨t²Î«h·|«öªí®æ¤ºªºÄæ¦ì¤¸¶¶§Ç¶ñ¤J¸ê®Æ¡C 2.Äæ¦ì¤¸ªº¸ê®Æ§ÎºA©M©Ò¶ñ¤Jªº¸ê®Æ¥²¶·§k¦X¡C 3.table_name ¤]¥i¥H¬O´ºÆ[ view_name¡C INSERT INTO table_name (column1,column2,...) SELECT columnx,columny,... FROM another_table »¡©ú¡G¤]¥i¥H¸g¹L¤@Ó¤l¬d¸ß¡]subquery¡^§â§Oªºªí®æªº¸ê®Æ¶ñ¤J¡C ¢±¡B¬d¸ß¸ê®Æ¡G °ò¥»¬d¸ß SELECT column1,columns2,... FROM table_name »¡©ú¡G§âtable_name ªº¯S©wÄæ¦ì¤¸¸ê®Æ¥þ³¡¦C¥X¨Ó SELECT * FROM table_name WHERE column1 = xxx [AND column2 > yyy] [OR column3 <> zzz] »¡©ú¡G 1.¡¦*¡¦ªí¥Ü¥þ³¡ªºÄæ¦ì¤¸³£¦C¥X¨Ó¡C 2.WHERE ¤§«á¬O±µ±ø¥ó¦¡¡A§â²Å¦X±ø¥óªº¸ê®Æ¦C¥X¨Ó¡C SELECT column1,column2 FROM table_name ORDER BY column2 [DESC] »¡©ú¡GORDER BY ¬O«ü©w¥H¬YÓÄæ¦ì°µ±Æ§Ç¡A[DESC]¬O«ü±q¤j¨ì¤p±Æ¦C¡AY¨S¦³«ü©ú¡A«h¬O±q¤p¨ì¤j ±Æ¦C ²Õ¦X¬d¸ß ²Õ¦X¬d¸ß¬O«ü©Ò¬d¸ß±o¸ê®Æ¨Ó·½¨Ã¤£¥u¦³³æ¤@ªºªí®æ¡A¦Ó¬OÁp¦X¤@Ó¥H¤Wªº ªí®æ¤~¯à°÷±o¨ìµ²ªGªº¡C SELECT * FROM table1,table2 WHERE table1.colum1=table2.column1 »¡©ú¡G 1.¬d¸ß¨âÓªí®æ¤¤¨ä¤¤ column1 ȬۦPªº¸ê®Æ¡C 2.·íµM¨âÓªí®æ¬Û¤¬¤ñ¸ûªºÄæ¦ì¤¸¡A¨ä¸ê®Æ§ÎºA¥²¶·¬Û¦P¡C 3.¤@Ó½ÆÂøªº¬d¸ß¨ä°Ê¥Î¨ìªºªí®æ¥i¯à·|«Ü¦hÓ¡C ¾ã¦X©Êªº¬d¸ß¡G SELECT COUNT (*) FROM table_name WHERE column_name = xxx »¡©ú¡G ¬d¸ß²Å¦X±ø¥óªº¸ê®Æ¦@¦³´Xµ§¡C SELECT SUM(column1) FROM table_name »¡©ú¡G 1.pºâ¥XÁ`©M¡A©Ò¿ïªºÄæ¦ì¥²¶·¬O¥i¼Æªº¼Æ¦ì§ÎºA¡C 2.°£¦¹¥H¥~ÁÙ¦³ AVG() ¬Opºâ¥§¡¡BMAX()¡BMIN()pºâ³Ì¤j³Ì¤pȪº¾ã¦X©Ê¬d¸ß¡C SELECT column1,AVG(column2) FROM table_name GROUP BY column1 HAVING AVG(column2) > xxx »¡©ú¡G 1.GROUP BY: ¥Hcolumn1 ¬°¤@²Õpºâ column2 ªº¥§¡È¥²¶·©M AVG¡BSUMµ¥¾ã¦X©Ê¬d¸ßªºÃöÁä¦r ¤@°_¨Ï¥Î¡C 2.HAVING : ¥²¶·©M GROUP BY ¤@°_¨Ï¥Î§@¬°¾ã¦X©Êªº¨î¡C ½Æ¦X©Êªº¬d¸ß SELECT * FROM table_name1 WHERE EXISTS ( SELECT * FROM table_name2 WHERE conditions ) »¡©ú¡G 1.WHERE ªº conditions ¥i¥H¬O¥t¥~¤@Óªº query¡C 2.EXISTS ¦b¦¹¬O«ü¦s¦b»P§_¡C SELECT * FROM table_name1 WHERE column1 IN ( SELECT column1 FROM table_name2 WHERE conditions ) »¡©ú¡G¡@ 1. IN «á±±µªº¬O¤@Ó¶°¦X¡Aªí¥Ücolumn1 ¦s¦b¶°¦Xùر¡C 2. SELECT ¥X¨Óªº¸ê®Æ§ÎºA¥²¶·²Å¦X column1¡C ¨ä¥L¬d¸ß SELECT * FROM table_name1 WHERE column1 LIKE ¡¦x%¡¦ »¡©ú¡GLIKE ¥²¶·©M«á±ªº¡¦x%¡¦ ¬Û©IÀ³ªí¥Ü¥H x¬°¶}ÀYªº¦r¦ê¡C SELECT * FROM table_name1 WHERE column1 IN (¡¦xxx¡¦,¡¦yyy¡¦,..) »¡©ú¡GIN «á±±µªº¬O¤@Ó¶°¦X¡Aªí¥Ücolumn1 ¦s¦b¶°¦Xùر¡C SELECT * FROM table_name1 WHERE column1 BETWEEN xx AND yy »¡©ú¡GBETWEEN ªí¥Ü column1 ªºÈ¤¶©ó xx ©M yy ¤§¶¡¡C ¢²¡B§ó§ï¸ê®Æ¡G UPDATE table_name SET column1=¡¦xxx¡¦ WHERE conditoins »¡©ú¡G 1.§ó§ï¬YÓÄæ¦ì³]©w¨äȬ°¡¦xxx¡¦¡C 2.conditions ¬O©Òn²Å¦Xªº±ø¥ó¡BY¨S¦³ WHERE «h¾ãÓ table ªº¨ºÓÄæ¦ì¤¸³£·|¥þ³¡³Q§ó§ï¡C ¢³¡B§R°£¸ê®Æ¡G DELETE FROM table_name WHERE conditions »¡©ú¡G§R°£²Å¦X±ø¥óªº¸ê®Æ¡C »¡©ú¡GÃö©óWHERE±ø¥ó«á±¦pªG¥]§t¦³¤é´Áªº¤ñ¸û¡A¤£¦P¸ê®Æ®w¦³¤£¦Pªº¹Bºâ¦¡¡C¨ãÅé¦p¤U¡G (1)¦pªG¬OACCESS¸ê®Æ®w¡A«h¬°¡GWHERE mydate>#2000-01-01# (2)¦pªG¬OORACLE¸ê®Æ®w¡A«h¬°¡GWHERE mydate>cast(¡¦2000-01-01¡¦ as date) ©Î¡GWHERE mydate>to_date(¡¦2000-01-01¡¦,¡¦yyyy-mm-dd¡¦) ¦bDelphi¤¤¼g¦¨¡G thedate=¡¦2000-01-01¡¦; query1.SQL.add(¡¦select * from abc where mydate>cast(¡¦+¡¦¡¦¡¦¡¦+thedate+¡¦¡¦¡¦¡¦+¡¦ as date)¡¦); ¦pªG¤ñ¸û¤é´Á®É¶¡«¬¡A«h¬°¡G WHERE mydatetime>to_date(¡¦2000-01-01 10:00:01¡¦,¡¦yyyy-mm-dd hh24:mi:ss¡¦) |
¤ÀÃþ: ubuntu §Þ³N¸ê®ÆÅX°Êµ{¦¡ :
§@ªÌ: lutuni (1:25 pm)
|
·í§Ú¹J¨ìÂI°}¦Cªí¾÷®É³£·|±NÅX°Êµ{¦¡¥Î¦¨EPSON LQ-1070Cªº¦Lªí¾÷ «Ü¦h¸õ¶,®Mªí·|¨«±¼ªº°ÝÃD³£OK¥i¥H¸Ñ¨M!! |
¤ÀÃþ: ¤Í¯¸³sµ²¤½¥q¦æ¸¹
§@ªÌ: lutuni (12:14 pm)
|
http://www.watercity88.com/ ¤½¥q¦W¡G ©w«°¥ø·~¦³¤½¥q ¤½¥q¹q¸Ü¡G 8867-7106898 FAX:8867-7108898 E-Mail¡G water.city88@seed.net.tw ¸gÀç²z©À¡G ¼ö§Õ¡Ð¥H¤H¬°¥»¡B¥HÅU«È¬°¥ýªºªA°Èºë¯«¡C ¿n·¥¡Ð¶Ô¾Ä°È¹ê¡B«i©ó¥ô¨Æªº¤u§@ºë¯«¡C ÄYÂԡиÛÀµ¾ë¹ê¡B¹ê¨Æ¨D¬Oªº¤u§@ºA«×¡C ³Ð·s¡Ð¤£Â_³Ð·s,´£¨Ñ³Ì·s³Ì¦nªºªA°È©M²£«~µ¹ÅU«È¡C ¤½¥q·~°È¡GRO¾÷/¶¼¥Î¤ô/±í¸Ë¤ô¼t³]³Æ³W¹º³]p¬I¤u/ RO¾÷¹s¥ó¶R½æ·~°È 1994ªì³Ð¦¨¥ßªF¨|¥ø·~¦æ,±q¨Æ¼p¨ã/¼ö¤ô¾¹/RO¾÷/½Ã¯D³]³Æ¶R½æ·~°È¡C ¡@ 1997 ¥[·ù¦w¼w¦¨,¶}©l¨«¤J¤ô³B²z±M·~·~°È,¦¨¬°¦w¼w¦¨°ª¶¯Àç·~³B,±q¨ÆRO¾÷ ¡@ 1998 ¤J¥D¦w¼w¦¨Á`¤½¥qªÑªF,³]¥ß¦w«°°Ó¦æ,§ó¿n·¥±À°Ê¦U¶µ·~°È,¦~©³¶i¤J¸³¨Æ·|¡C ¡@ 1999 ¦]À³¥[·ù°Ó¤Î¥«³õ»Ý¨D,§ë¤J¥[¤ô¯¸±À®i¡C ¡@ 2000 ¥»¤½¥q³]pG«¬¬[¦¡RO¾÷¬[¤Î¤p«¬°Ó¥Î¾÷,¥«³õ¤ÏÀ³¨}¦n,·~¬É¯É¯É¨¾®Õ, ¡@ 2000 ¶}©l§ë¤J¦Û¦³²£«~ªº¬ãµo/³]p/»s³y,©ó¦~©³12¤ë¥÷µù¥U³Ð¥ß¦Û¦³«~µP, 2001 ¶}©l±À¼s"¤ô«°¥«"²b¤ô¨t¦C²£«~·~°È,«ùÄò¬ãµo¨t¦C²£«~,5¤ë¬ãµo¶W´¼¼z«¬¤p«¬°Ó¥Î¾÷ 2002 ¶}©l¬ãµo°Ó¥Î¥«³õ¨t¦C²£«~,¶W´¼¼z«¬AB¤p«¬°Ó¥Î¾÷300G~500G,4¤ë¤W¥«¡C 2003 ¬ãµo¤¤«¬°Ó¥Î¾÷800G~6000G,9¤ë¤W¥«¡C 2004 ¶}©l±À¼s°Ó¥Î¾÷·~°È,ÂX¤j·~°È½d³ò(®a¥Î¾÷~¤¤«¬°Ó¥Î¾÷),¨Ã©ó·í¦~6¤ë¥H¸ê¥»ÃB 500¸U¤¸,¦¨¥ß"©w«°¥ø·~¦³¤½¥q",¥¿¦¡ÁÚ¤J§ó±M·~¤Æ»â°ì,¥B¶}©l§ë¤J ¦Û»s¤¸¥óªº¬ãµo¤Î²£«~¼Ò²Õ 2005 ¶}©l§ó±M·~¤ÆªA°È,¨Ì«È¤á»Ý¨D,§@±í¸Ë¤ô¼t³W¹º/³]p/»s³y/¬I¤uªº¾ãÅé¤uµ{;±M¥Î ¶gÃ仲§U³]³Æ:±M¥Î¤ô³B²z³]³Æ:¥N«È³]p»s³y±M½æ®a¥Î²b¤ô¨t¦C²£«~¡C 2006 ¶}©l§ë¤J¾÷¾¹¾ãÅ餯³]p,¸õ²æ«÷¸Ë¾÷²Õ¸Ë¼Ò¦¡,¾ãÅé/¬üÆ[/ºûÅ@/»Ý¨D/¹ê¥Î¤¤jì«h 2007 ¨Ì°Ó¥Î¥«³õ«È¤á»Ý¨D,º³Ð°Ó¥Î¾÷°¨¹F«OÅ@¦Û°ÊªþÂk¸Ë¸m,200G~500G¨t¦C¾÷«¬,¤Î§K¸É«¬®a¥ÎRO¾÷,±M§Q³q¹L¡C |
¤ÀÃþ: ¤Í¯¸³sµ²¤½¥q¦æ¸¹
§@ªÌ: lutuni (11:40 am)
|
ºô§}:http://www.yowey.com.tw/ Àu½Ã¶¼¤ô¾¹§÷¤½¥q Ä£ÝÂ¥ø·~¦³¤½¥q¦¨©ó1995¦~,±M·~©ó¶¼¤ô³]³Æ,¤Î¬ÛÃö¹s²Õ¥ó¤§¬ãµo»s³y»P¾P°â.§Ú֦̾³³Ì±M·~ªº¬ãµo¹Î¶¤¤Î°ª¬ì§Þªº¥Í²£³]³Æ,±q²£«~³]p,¼Ò¨ã¶}µo, ¥Í²£³]³Æ,²£«~³]p,¼Ò¨ã¶}µo,¥Í²£»s³y¤Î¦U¤@¶µ´ú¸Õ,¬Ò««§âÃö,´£¨Ñ°ê¤º¥~«È¤á³ÌÀu¨}ªº«~½è¤Î³Ì¦X²zªº»ù®æ¨Ã¬°«È¤á³Ð³y³ÌÀu¨}ªº«~½è¤Î³Ì¦X²zªº»ù®æ¨Ã ¬°«È¤á³Ð³y³ÌÀu¶Õªº¤O. ¥»¤½¥q¥D¤O²£«~¬°¦U¦¡ÅKªO,ÅK¬[,¤Î°ª§CÀ£¶}Ãöµ¥µ¥..,¥¼¨Ó¥»¤½¥q¦p¤µ«ùÄò¤£Â_ªº¬ãµo·s²£«~¥H¹F¨ì¥xÆW¤Î°ê»Ú¶¡§ó±j¯PªºªÖ©w ¡C ¤½¥q¦WºÙ: Ä£ÝÂ¥ø·~¦³¤½¥q ¤½¥q¦a§}: °ª¶¯¥«»ñ¤s°Ï«Ø°ê¸ô¤@¬q253¸¹ ¤½¥q¹q¸Ü:(07)702-6100 ¤½¥q¶Ç¯u:(07)702-6003 E-Mail¡G yowey.a3813@gmail.com |
¤ÀÃþ: ¤Í¯¸³sµ²¤½¥q¦æ¸¹
§@ªÌ: lutuni (11:36 am)
|
¤ÀÃþ: OSCommerce¹q¤l°Ó°È
§@ªÌ: lutuni (12:53 pm)
|
<?php /* original: $Id: product_listing.php,v 1.44 2003/06/09 22:49:43 hpdl Exp $ corrected for proper HTML 2005/07/10 JanZ merged and updated by djmonkey1 with indispensable assistance by JanZ 2005/10/05 v2.1 developed by djmonkey1 with indispensable assistance by the Mighty JanZ 2005/10/09 reverted to a non-SPPC state by djmonkey1 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ //bof product listing with attributes $list_box_contents = array(); $list_box_contents[] = array('params' => 'class="productListing-heading"'); $cur_row = sizeof($list_box_contents) - 1; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MULTIPLE': $add_multiple = "1"; echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_multiple', 'NONSSL') . '">'; break; }} //eof product listing with attributes ?> <?php $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } $list_box_contents = array(); if ($listing_split->number_of_rows > 0) { $row = 0; //$rows = 0; $column = 0; $listing_query = tep_db_query($listing_split->sql_query); while ($listing = tep_db_fetch_array($listing_query)) { // WARNING the code assumes there are three products per row. To use a different number change the number // at line 195: if ($column >= 3) and the code to fill up the table row below that accordingly // $counter = $row; // $class_for_buy_now = 'class="productListing-odd"'; // $list_box_contents[$row] = array('params' => 'class="productListing-odd"'); $rows++; if (($rows/2) == floor($rows/2) && ($row > $counter)) { $list_box_contents[$row] = array('params' => 'class="productListing-even"'); $class_for_buy_now = 'class="productListing-even"'; $counter = $row; } else { if ($row > $counter) { $list_box_contents[$row] = array('params' => 'class="productListing-odd"'); $class_for_buy_now = 'class="productListing-odd"'; $counter = $row; } } $product_contents = array(); for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = ' ' . $listing['products_model'] . ' '; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> '; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> '; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing['specials_new_products_price'])) { $lc_text = ' <s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' '; } //zeph if price is 0.00 then dont display price $pprice = $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])); if ($pprice == "$0.00") { $lc_text = 'See listing for price.'; } break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; //$lc_text = 'Stock: ' . $listing['products_quantity'] . ' '; $lc_text = ''; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = ' ' . $listing['products_weight'] . ' '; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { //zeph use custom image sizes. original code is commented out. $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'thum/thum_' . $listing['products_image'], $listing['products_name'], $listing['products_image_width']/*SMALL_IMAGE_WIDTH*/, $listing['products_image_height']/*SMALL_IMAGE_HEIGHT*/) . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'thum/thum_' . $listing['products_image'], $listing['products_name'], $listing['products_image_width']/*SMALL_IMAGE_WIDTH*/, $listing['products_image_height']/*SMALL_IMAGE_HEIGHT*/) . '</a> '; } break; //bof product listing with attributes case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; if ($listing['products_quantity']>=2000) { $lc_text = tep_image_button('button_buy_now_na.gif', IMAGE_BUTTON_BUY_NOW_NA) . ' '; } else { $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } break; // Begin Buy Now button with attributes and quantity mod // Begin Add Multiple with attributes Contrib case 'PRODUCT_LIST_MULTIPLE': $lc_align = 'right'; $lc_valign = 'top'; $lc_text = (TABLE_HEADING_MULTIPLE . tep_draw_input_field('Qty_ProdId_' . $listing['products_id'], '0', 'size="4"')); //zeph adds p.products_image_height and p.products_image_width to query $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_height, p.products_image_width, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . $listing['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { $lc_text .= '<table border="0" cellpadding="0" cellspacing"0">'; $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $selected = 0; $products_options_array = array(); $lc_text .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td>' . "\n"; $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $listing['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } //$lc_text .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]); //$lc_text .= tep_draw_pull_down_menu('id_'.$listing[$x]['products_id'].'[' . $products_options_name_values['products_options_id'] . ']', $products_options_array); $lc_text .= tep_draw_pull_down_menu('id_'.$listing['products_id'].'[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]); //$lc_text .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]); $lc_text .= '</td></tr>'; } $lc_text .= '</table>'; } break; case 'PRODUCT_LIST_BUY_NOW_MULTIPLE': $lc_align = 'right'; $lc_valign = 'top'; $lc_text = '<form name="buy_now_' . $listing['products_id'] . '" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now_form', 'NONSSL') . '">'; //zeph adds p.products_image_height and p.products_image_width $lc_text .= (TABLE_HEADING_MULTIPLE) . '<input type="text" name="cart_quantity" value="1" maxlength="6" size="4">'; $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_height, p.products_image_width, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . $listing['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { $lc_text .= '<table border="0" cellpadding="0" cellspacing"0">'; $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $selected = 0; $products_options_array = array(); $lc_text .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td>' . "\n"; $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $listing['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } $lc_text .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]); //$lc_text .= tep_draw_pull_down_menu('id_'.$listing['products_id'].'[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]); $lc_text .= '</td></tr>'; } $lc_text .= '</table>'; $lc_text .= tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW); } if ($products_attributes['total'] == 0) { $lc_text .= '<br> '; $lc_text .= tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW); $lc_text .= '<br> '; $lc_text .= '<table border="0" cellpadding="0" cellspacing"0"><tr><td class="main"></td><td></td></tr></table>'; } $lc_text .= '</form>'; break; // End Add Multiple mod } $product_contents[] = $lc_text; } $lc_text = implode('<br>', $product_contents); $list_box_contents[$row][$column] = array('align' => 'center', //bof product listing with attributes 'valign' => $lc_valign, //eof product listing with attributes 'params' => 'class="productListing-data"', //zeph 'text' => '<table width="99%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="right" valign="bottom" bordercolor="0"><img src="images/infobox_module/upper_left.gif" width="14" height="33" /></td> <td background="images/infobox_module/top.gif" class=mws_boxTop_module ></td> <td align="left" valign="bottom"><img src="images/infobox_module/upper_right.gif" width="14" height="33" /></td> </tr> <tr> <td background="images/infobox_module/left.gif" width="14"> </td> <td align="center" class=mws_boxCenter_module>' . $lc_text . '</td> <td background="images/infobox_module/right.gif" class="smallText" width="14"><img src="images/infobox_module/right.gif" width="14" height="149" /></td> </tr> <tr> <td align="right" valign="top"><img src="images/infobox_module/lower_left.gif" width="14" height="12" /></td> <td background="images/infobox_module/bot.gif"><img src="images/infobox_module/bot.gif" width="2" height="12" /></td> <td align="left" valign="top" class="smallText"><img src="images/infobox_module/lower_right.gif" width="14" height="12" /></td> </tr> </table>'); //'text' => $lc_text); $column ++; if ($x == ($no_of_listings -1)) { // fill up the remainder of the table row with empty cells, assumes three products per row! if ($column == '1') { $list_box_contents[$row][$column + 1] = array('align' => 'center', //bof product listing with attributes 'valign' => $lc_valign, //eof product listing with attributes 'params' => 'class="productListing-data"', 'text' => " "); $column ++; } if ($column == '2') { $list_box_contents[$row][$column + 1] = array('align' => 'center', //bof product listing with attributes 'valign' => $lc_valign, //eof product listing with attributes 'params' => 'class="productListing-data"', 'text' => " "); } } if ($column >= 3 || $x == ($no_of_listings -1) ) { $row ++; // we start a new tr here with $list_box_contents $list_box_contents[$row] = array('params' => $class_for_buy_now); $column = 0; } } // end for ($x = 0; $x < $no_of_listings; $x++) new productListingBox($list_box_contents); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); new productListingBox($list_box_contents); } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php //echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> <?php if ($add_multiple == "1"){ ?> <tr> <td align="left" class="main"><!--a href="<//?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'file:///Y|/Documents/Websites/Best%20Test%20Site/catalog/includes/modules/%20', 'SSL'); ?>"><//?php echo tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT); ?></a--></td> <td align="right" class="main"><?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> </tr> <?php } ?> </table> <?php } ?> |