MySQL通过分隔符提取结果
我有一个快速(希望简单)的问题。我在 MySQL 数据库中存储了一些信息:
|info1=value1
|info2=value2
|info3=value3
|info4=value4
|info5=value5
|info6=value6
我需要能够从中获取一组特定的信息。我们假设这组数据位于名为 options 的表中的每条记录中。我需要能够提取 info3
值信息,这意味着我需要(对于每条记录)收到记录的“value3
”部分。我不需要“|info3=
”,只需要“value3
”;每个记录的“value3
”的实际值都不同。
I have a quick (hopefully simple) question. I have some information stored in a MySQL database:
|info1=value1
|info2=value2
|info3=value3
|info4=value4
|info5=value5
|info6=value6
I need to be able to get a certain set of information form this. Let's pretend that this set of data is in each record in a table called options. I need to be able to extract info3
value information, meaning that I need to (for every record) recieved the "value3
" section of the record. I don't need "|info3=
", just the "value3
"; the actual value of "value3
" is different for each record.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的问题很简单,好吧。
我认为答案并不相同:
这应该做你想做的事。
但是,我真的希望这只是为了玩,否则,我建议您检查您的数据库设计。
You question is simple, alright.
I don't think the same can be told about the answer:
This should do what you want.
BUT, I really hope that this is just for play, otherwise, I would recomend that you review your database design.