下拉列表,格式化 [英] Dropdown, formatting
问题描述
首先,抱歉英语不好。
我有以下任务:
在Mysql中我有一个事件表。事件在3个字段中描述:日期,地点,活动。
现在我想构建一个下拉列表,用户可以通过点击选择其中一个事件,所有这些都以一种众所周知的方式进行。
到目前为止我没有问题,但问题是下拉列表中的文本是一团糟。其中两个字段长度可变。
我尝试了添加空格然后用substr截断的组合。这是一个很好的改进,但还不够好。
你们中的任何人都可以给我一个提示,让我走上正轨吗?
事先谢谢
Jan-Erik
瑞典。
***************
First, sorry for poor English.
I hav the following task:
In a Mysql I have a table of events. An event is described in 3 fields: date, place, activity.
Now I want to build a dropdown list where users can select one of the events by klicking, all in a wellknown manner.
So far I have no problems, but the problem is that the text in the dropdown list is a mess. Two of the fields are of variable length.
I tried a combination of adding spaces and then truncate with substr. It was a good improvement, but not good enough.
Could anyone of you give me a hint to bring me inte the right track?
Thanks in beforehand
Jan-Erik
Sweden.
***************
推荐答案
请显示您的代码,以便我们查看您到目前为止所做的工作。
Ronald:很酷:
Please show your code so we can look at what you have done until now.
Ronald :cool:
请显示您的代码,以便我们查看您到目前为止所做的工作。
Ronald:很酷:
Please show your code so we can look at what you have done until now.
Ronald :cool:
罗纳德:我敢吗? :-)
[php]
<身体>
< ?php
包括TJanslut.php;
Ronald: Do I dare to? :-)
[php]
< body>
< ?php
include "TJanslut.php";
query =(" SELECT evdate,evname,evplats FROM events")或die (mysql_error());
query = ("SELECT evdate, evname,evplats FROM events") or die ( mysql_error() );
这篇关于下拉列表,格式化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!