如何使用 PHP 构建支持票证系统?

发布于 2024-09-07 18:46:19 字数 1435 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

愚人国度 2024-09-14 18:46:19

票务系统是一个非常简单的构建,有一个数据库表:

tickets
id int(11)
user_id int(11)
message text
is_active tinyint(1)
created_at datetime
time_spent int(5) //unless your going to spend more than 99999 mins on a ticket

现在,每次用户创建票证时,它都会以 VALUES(id,'$user_id','$message',0,NOW(), 0)//记得清理变量

管理员可以完成一个票证,更新字段以使 is_active = 1,然后向管理员请求花费的时间并更新 time_spent = '$time_spent'

您可以简单地添加一个评论系统

Database table: comments
id int(11)
ticket_id int(11)
user_id int(11)
comment text
created_at datetime

这样,您可以在每张票证上拥有无限的评论(总共最多 99999999999 条),并且您可以跟踪用户 ID,以便您可以在每个评论旁边添加名称。

调用评论

您可以使用select * from comments where Ticket_id = $id //the current Ticket id

我希望这会有所帮助,它是一个很好的简单构建,意味着您确切地知道它是如何工作的,它总是很好自己完成并且可以轻松定制。

问候卢克

Ticketing systems are a pretty easy build, have a database table:

tickets
id int(11)
user_id int(11)
message text
is_active tinyint(1)
created_at datetime
time_spent int(5) //unless your going to spend more than 99999 mins on a ticket

Now each time a user creates a ticket it goes into the db as VALUES(id,'$user_id','$message',0,NOW(),0)//remember to clean the vars

Admin can complete a ticket, update the field so that is_active = 1, then request time spent from the admin and update time_spent = '$time_spent'

You could add a commenting system simply

Database table: comments
id int(11)
ticket_id int(11)
user_id int(11)
comment text
created_at datetime

This way you can have unlimited(up to a total total of 99999999999) comments per ticket and you track the user id so you can put names next to each comment.

You can call the comments using

select * from comments where ticket_id = $id //the current tickets id

I hope this helps, its a nice easy build and means you know exactly how it works, its always nice to have done it yourself and its easily customisable.

Regards Luke

旧城烟雨 2024-09-14 18:46:19

您可以使用开源且免费的osTicket

You could use osTicket which is open source and free.

寄居人 2024-09-14 18:46:19

或者使用 Spiceworks。它是免费的。

Or use Spiceworks. It's free.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文