我有一个简短的 url 脚本,我想向它添加链接命中功能。
当有人访问从脚本生成的链接时,点击会在数据库中更新。
我制作了一个包含以下字段的mysql表:
id, shortened_url, url, timestamp, hits.
`id` int(11) NOT NULL auto_increment,
`shortened_url` varchar(10) NOT NULL,
`url` varchar(255) NOT NULL,
`hits` int(11) NOT NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
任何帮助表示赞赏。