mysql数据库存歌,在MySQL数据库中存储歌词

在MySQL数据库中存储音乐歌词,建议使用TEXT类型的lyric列,并将其存储在独立的MyISAM表中,以配合使用InnoDB引擎的tracks表。线断可以保持原样,不需要用特殊字符替换。在输出到HTML时,使用nl2br()函数(PHP中)将换行转换为`
`。
摘要由CSDN通过智能技术生成

I wanted to know what is the best way of storing music "Lyrics" in a mysql database. and what are the setting used for that. Also, i would like the table to store the break lines.

I was thinking about using "|" to indicate a new line and using php to replace string.

I have no idea where to start, or what to use for the parameters (varchar, int (i know it's not going to be int), etc.)

Currently, I have my tracks table laid out like this

table tracks

----

id (int, 10, primary key)

albumid (foreign key to albums table)

name (varchar, 50)

override_artist (overrides album artist if not null)

playtime (int, 5)

lyric (??????)

Any ideas would be awesome.

解决方案

Your lyric column should be the TEXT type, and you should probably store it in a separate MyISAM table keyed to t

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值