duanlian1320 2019-06-17 09:00
浏览 37

用于注册的Codeigniter验证表单

Okay, I have implemented Search function in my data list

Problem and Example:

For The Table consist of : username, email address, role, day created

What i wanted to do and problem that I have met

There is 2 different input , 1 is "Date/Time" , and 1 is "role" search function

What i want: When I type : roles (teacher) , it show able to list out all the details of the data(teacher) when i choose : 06/16/2019 , it show show all the data that have been created today

Is there any tips/idea how to do it ? what i have done : I am able to perform a search function when i choose a date and input a role . But I can't do it when i tried to separate it . Such as "search for "teacher" ) it will show Error for me .

EDIT(UPDATE)

$roles = ($this>url>segment(3)) ? $this>url>segment(3) : $dbRoles ;
$dateCreated = ($this>url>segment(4)) ? $this>url>segment(4) : $createDate;

The code above show is the part of the code that i trying to do .

When user only search for roles it will use the first line which is only using segment(3) , but when user search by "date" it will use the segment(4) code.

In other part of my codes , include of segment(5) which is when both(roles and date) is search together.

In other words, i wanted to know how do i able to make it when search by roles it force to use the segment(3) code, when search by date , use segment(4) .

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 目详情-五一模拟赛详情页
    • ¥15 有了解d3和topogram.js库的吗?有偿请教
    • ¥100 任意维数的K均值聚类
    • ¥15 stamps做sbas-insar,时序沉降图怎么画
    • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
    • ¥15 关于#Java#的问题,如何解决?
    • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
    • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
    • ¥15 cmd cl 0x000007b
    • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line