本文介绍了密码根据月份而变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我想拥有一个每个月都会更改的密码。如果我有一张桌子 ,其中一个字段为''Month',月份数和另一个字段 称为''密码''有12条记录。什么是查看当前日期的最佳方式,然后,如果是2月,那么选择与月份字段中的数字2相对的 密码。 dixieI want to have a password that will change for each month. If I had a tablewith a field of ''Month'' with the number of the month and another fieldcalled ''Password'' that had twelve records. What would be the best way oflooking at the current date and then, if it was say February, picking thepassword that was against the number 2 in the Month field.dixie推荐答案 tblP MonthID P 1 MLKJr 2 BMyValentine 3 bean239 4个小号 5 mmmysdy 6 dddysdy 7 ahatfoj 8 nohldy 9 tmstrs 10 gstsngblns 11 trkygblr 12 ntvty SELECT P FROM tblP IN''G:\ HiddenDirectory \P.mdb''WHERERE MonthID = Month(Now()); 这可能不是最好的方法,但应该有效。不要使用Month作为 字段名称,因为它是一个保留字。 MonthID的类型为Long。 James A. FortunetblPMonthID P1 MLKJr2 BMyValentine3 bean2394 prlfls5 mmmysdy6 dddysdy7 ahatfoj8 nohldy9 tmstrs10 gstsngblns11 trkygblr12 ntvtySELECT P FROM tblP IN ''G:\HiddenDirectory\P.mdb'' WHERE MonthID =Month(Now());This may not be the best way but it should work. Don''t use Month for afield name since it''s a reserved word. MonthID is of type Long.James A. Fortune 一个表 字段 方式 tblP MonthID P 1 MLKJr 2 BMyValentine 3 bean239 4 prlfls 5 mmmysdy 6 dddysdy 7 ahatfoj 8 nohldy 9 tmstrs 10 gstsngblns 11 trkygblr 12 ntvty SELECT P FROM tblP IN''G:\ HiddenDirectory \P.mdb''WHERERE MonthID = 月(现在()); 这可能不是最好的方法,但应该有效。不要将Month用作字段名称,因为它是一个保留字。 MonthID的类型为Long。 James A. Fortune tblP MonthID P 1 MLKJr 2 BMyValentine 3 bean239 4 prlfls 5 mmmysdy 6 dddysdy 7 ahatfoj 8 nohldy 9 tmstrs 10 gstsngblns 11 trkygblr 12 ntvty SELECT P FROM tblP IN ''G:\HiddenDirectory\P.mdb'' WHERE MonthID = Month(Now()); This may not be the best way but it should work. Don''t use Month for a field name since it''s a reserved word. MonthID is of type Long. James A. Fortune 一个表 字段 方式 tblP MonthID P 1 MLKJr 2 BMyValentine 3 bean239 4 prlfls 5 mmmysdy 6 dddysdy 7 ahatfoj 8 nohldy 9 tmstrs 10 gstsngblns 11 trkygblr 12 ntvty SELECT P FROM tblP IN''G:\ HiddenDirectory \P.mdb''WHERERE MonthID = 月(现在()); 这可能不是最好的方法,但应该有效。不要将Month用作字段名称,因为它是一个保留字。 MonthID的类型为Long。 James A. Fortune tblP MonthID P 1 MLKJr 2 BMyValentine 3 bean239 4 prlfls 5 mmmysdy 6 dddysdy 7 ahatfoj 8 nohldy 9 tmstrs 10 gstsngblns 11 trkygblr 12 ntvty SELECT P FROM tblP IN ''G:\HiddenDirectory\P.mdb'' WHERE MonthID = Month(Now()); This may not be the best way but it should work. Don''t use Month for a field name since it''s a reserved word. MonthID is of type Long. James A. Fortune 这篇关于密码根据月份而变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-02 21:37