如何从mysql中的那天加载{html_select_date}中的那一天
i need to display the drop down when the day is come from mysql
my query is
select doj from user_detatils where user_id='2'
i use the html_select_date for the drop down option
The code is below
{html_select_date start_year=1970 month_format="%b" field_order="dmy"
field_array="date" prefix="" day_id="dd" month_id="mm" year_id="yy"
year_empty="Year" month_empty="Month" day_empty="Day" }
if the table return the doj that date will be select in the drop down else the drop down didn't select any value
我需要显示当天来自mysql的下拉列表 p>
我的查询是 p>
从user_detatils中选择doj,其中user_id ='2'
code> pre>
我使用html_select_date 下拉选项 p>
代码位于 p>
{html_select_date start_year = 1970 month_format =“%b”field_order =“dmy”\ n field_array =“date”prefix =“”day_id =“dd”month_id =“mm”year_id =“yy”
year_empty =“年”month_empty =“月”day_empty =“Day”}
code>
如果表格返回doj,那么日期将在下拉列表中选择
else下拉列表没有选择任何值 p>
div>
Following up on how can change the numeric to month in words.
{html_select_date} explains the time argument. granted, it does a poor job in explaining that time=null
will lead to "no date selected" and anything else that evaluates falsy (false, 0, "", …) will select the "current date".
So your PHP should check if the database has a valid date in doj, otherwise set that variable to null
.