Memo : MySQL -- 找出重複資料

文章發佈於 : 2006-01-23 22:04:45 | 文章分類 : 程式相關
標籤 :

SELECT a.ad13_area_code, a.ad13_city_name
FROM ad13 a, ad13 b
WHERE a.ad13_area_code = b.ad13_area_code
GROUP BY 1 , 2
HAVING count( a.ad13_area_code ) >1
 Love is waiting so you don't have to. Join Date.com for free!
 Join Asia FriendFinder the Largest Asian Dating Site on the Web for FREE!
 Kaspersky Security for Internet Gateway 7.0
 Know when to sell on eBay using research

閱讀全文 | 回 應(0) |

 變更MySQL欄位中某段文字的SQL語法

文章發佈於 : 2006-01-10 22:08:46 | 文章分類 : 程式相關
標籤 :

My table looks like this

+----------------+
| column_name |
+----------------+
| abcOLDdefOLd |
| OLDjklmOLD |
| tuvwxyzOLDOLD|
+----------------+

To change only first occurrence of the string 'OLD' into 'NEW'
we can use following query. (Replace wont work as it replaces all occurrences)

update table_name set column_name=insert(column_name,instr(column_name, 'OLD'), length('OLD'), 'NEW');

Now select * from table_name will give output as

+----------------+
| column_name |
+----------------+
| abcNEWdefOLd |
| NEWjklmOLD |
| tuvwxyzNEWOLD|
+----------------+

 Love is waiting so you don't have to. Join Date.com for free!
 Join Asia FriendFinder the Largest Asian Dating Site on the Web for FREE!
 Kaspersky Security for Internet Gateway 7.0
 Know when to sell on eBay using research

閱讀全文 | 回 應(0) |

 動態行數資料處理(PHP+JavaScript)

文章發佈於 : 2005-12-05 17:03:01 | 文章分類 : 程式相關
標籤 :

==== PHP ====
在Button的onClick裡面這樣寫
onClick="CalDelayFee('{CalMoney}','{pay_date}',document.all.real_date_{k}.value,'{FeeRate}','dely_mony_{k}')"


==== Java Script ====
function CalDelayFee(CalMoney,pay_date,real_date,FeeRate,DelayMoneyField){
var RealDate = new Date(real_date.replace("-","/"));
var PayDate = new Date(pay_date.replace("-","/"));
var DateDiff = (RealDate - PayDate)/86400000;
var DelayMoney = parseFloat(CalMoney*DateDiff*FeeRate).toFixed(2);
document.getElementById(DelayMoneyField).value = DelayMoney;
}

** function(應繳金額,應繳日期,實繳日期,遲繳利率,傳入的動態資料ID){}
** toFixed(2) : 取小數點後兩位四捨五入
 Love is waiting so you don't have to. Join Date.com for free!
 Join Asia FriendFinder the Largest Asian Dating Site on the Web for FREE!
 Kaspersky Security for Internet Gateway 7.0
 Know when to sell on eBay using research

閱讀全文 | 回 應(0) |

 VS 2005 Video Training --- Free

文章發佈於 : 2005-12-04 23:05:20 | 文章分類 : 程式相關
標籤 :

Follow this link to see free Asp.net 2.0 Video Training
http://msdn.microsoft.com/vstudio/express/vwd/learning/default.aspx


 Love is waiting so you don't have to. Join Date.com for free!
 Join Asia FriendFinder the Largest Asian Dating Site on the Web for FREE!
 Kaspersky Security for Internet Gateway 7.0
 Know when to sell on eBay using research

閱讀全文 | 回 應(0) |

 BlogShares Links Exchange

1. Step into the Nexus 2. Scary Personals 3. Scared Bunny
4. This Is A Cult 5. Its all about me 6. Webby's World
7. Flower Delivery 8. Mindblogging Stuff 9. Random Thoughts by R. U. Serious
10. Palmistry and Hand Analysis 11. Forward-and-Share 12. The Site With the Lamp
13. Free Sample Forager 14. Kosir 15. CRM Reports

 阿維推薦

1. ㄚ凱隨手記 2. ↖「懿」*瘋*堂↗ 3. A.D. Notepad 西元記事本
4. Liang's Blog 5. 硬是要學! 6. 北國風情
7. 綠色工廠 8. 淡淡的天空藍 9. 班大貓廢紙塗鴉部落格
10. 大豆剝落殼 11. SEO网站优化推广 12. lazy Guy
13. PHP 黑店 14. Meson手扎

 Back Links