gpt4 book ai didi

php - BLOB 优于 varchar?

转载 作者:行者123 更新时间:2023-11-29 04:59:11 29 4
gpt4 key购买 nike

我正在开发一个博客,我的客户希望在其中使用大量图像(文章、标题、广告等)。他几乎不想要任何文本,因为他希望用阿拉伯语开发博客并且他对网络浏览器支持的任何字体都不满意,他也不想采用 EOT,他将每天更新博客(比如只是上传图片),

你认为我应该为它使用什么数据类型? BLOB 还是 VARCHAR?

PS: 我正在使用 MySQL..

Check out the following site which uses the same concept as of my clients, although they are rivals, they have used images for links, news or advertisements and still the site is not that heavy..

http://www.sahilonline.net/

最佳答案

Update: I misunderstood that you want to store the text as images. The recommendations below are for storing native text, not image data. I have to agree with @Col that this is a very bad idea - performance-wise, in regards to search engine visibility (no indexing will take place), accessibility for people with visual or other impairments, different screen resolutions, mobile devices... Although I can understand that the selection of browser-available fonts does arabic characters even less justice than they do ours, I would try and get the client away from this idea.

对于新项目,绝对是 VARCHARTEXT/LONGTEXT 使用 UTF-8 字符集。

主要原因是只有 (VAR)CHAR 和 TEXT 可以做 fulltext search

您在数据库中存储数据的方式与阿拉伯字体支持或编码问题无关。 UTF-8 表可以毫无问题地存储阿拉伯文本。

关于编码问题的一些非常透彻的基本阅读,有 Joel Spolsky 著名的 Unicode article .

mySQL 5 String type overview

关于php - BLOB 优于 varchar?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3456799/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com