What is the disadvantage to using a MySQL longtext sized field when every entry will fit within a mediumtext sized field?
The reason I am asking is because I have some longtext sized fields and recently realized they are much too large, but then…
I'm executing a SELECT query on a table in MySQL using the command-line interface (not a GUI client):
SELECT * FROM blog_entry;
One of blog_entry's fields is of type 'longtext' and is such a long piece of text that when the result is displayed in…
One of my entities Machinery has got a String property called notes. JPA 2-Hibernate generates the schema for me, in my case the RDBMS is a MySQL.
notes is created as a VARCHAR(255) column, which is right.
Users begin to create records and all works…
I trying to output an array from the database to the screen.
In my entity:
/**
* @ORM\Column(type="array", nullable=true)
*/
private $category;
In my twig template:
{% for category in user.profile.category %}
{{ category }}
{% endfor…
I'm developing a multilingual PHP web application, and I've got long(-ish) texts that I need to translate with gettext. These are email templates (usually short, but still several lines) and parts of view templates (longer descriptive blocks of…
Background
I'm making an app that has some settings, and I want to use the built in PreferenceActivity or PreferenceFragment for the job
The problem
Some of the preferences have a long title which I cannot shorten, plus I think that if I ever…
I am trying to execute the query below in MySQL but get the SQL error 1406 Data too long for column error every time. The column data type is longtext. Any ideas?
UPDATE `my_db`.`my_table` SET `content` = '
Unfortunatelly I am not able to make ellipsize for EditText works. Is even possible to put three dots at the end of the text when the text is too long? It is working perfectly for TextiView but not for EditText. Some idea?
…
I am trying to make a order system, but I am stuck right now.
In the mysql tabel right now, I am using varchar(255) in a column named "bestillinger", but it can only store 255 chars. So I searched a bit, and remembered that i could use longtext or…
I've got a database query function that works well -- except that I'm running into what's apparently a known issue with mysqli prepared statements and longtext fields. What happens is that the longtext field always comes up empty even though…
I am having an issue due to LONGTEXT field. Everything works fine, but when a SELECT query is executed with any WHERE clause in it, the mysql goes to sleep and never returns. There are only 80k records and explicit WHERE comparison works fine. (Some…
I have the following JPA SqlResultSetMapping:
@SqlResultSetMappings({
@SqlResultSetMapping(name="GroupParticipantDTO",
columns={
@ColumnResult(name="gpId"),
…
$query="INSERT INTO `ARTICLES` (`TITLE`, `BY`, `IN`, `POST`)
VALUES('". $title ."', '". $by ."', '". $in ."', '". $_POST['post'] ."')";
This code is able to save small length text but not large. The datatype for the POST field is longtext.
Also if…
The SQL...
UPDATE Threads t
SET t.Content = (
SELECT GROUP_CONCAT(a.Content ORDER BY a.PageID SEPARATOR '')
FROM MSarticlepages a
WHERE a.ArticleID = t.MSthreadID GROUP BY a.ArticleID
)
As you can see it takes all of…
I want to read a long text from os.Stdin, but I can't make it happen. Already read everything in the subject, tried codes that supposed to work. Every method cuts after 4096 characters, no matter what.
Eg. here's a working example. After the first…