L
L
LemanRass212016-07-18 15:19:27
MySQL
LemanRass21, 2016-07-18 15:19:27

How to store comments from a website in MySQL?

Hello.
I want to do something like a blog.
Each page, roughly speaking, will consist of a text (article) from the author and a block of comments for other users.
Of course, there will be some kind of text formatting such as a selected font, or in general, at least wrapping to a new line in any place convenient for users. Suppose after the title the author will make one empty line and then start the text with a capital bold letter.
1) How can I save this to the database correctly so that when users go to this page, all the text from the database is correctly loaded, taking into account all the hyphenation and text formatting?
2) If I add another chat, how can I make it so that users without reloading the page have the chat updated as soon as new messages arrive? Probably run ajax request for asynchronous loading of messages from the database with some periodicity or is there a more elegant way? If there is, then it should also be suitable for an android application that will make it possible to climb the site and leave comments. (Yes, I know that it would be possible to just open the site in a browser on a mobile phone and it would be much easier, but the customer was impatient to have his own application for his site).
3) How could I organize the ability to watch video and listen to audio in a stream (loading gradually) in an android application if I was going to write it in C # with subsequent conversion through the Unity3d game engine? (I know that it is, to put it mildly, suspicious to go to work through the bypass, but alas, I have no other way).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
LittleFatNinja, 2016-07-18
@LittleFatNinja

serialization

C
coden55, 2016-07-18
@coden55

For the second point, use websocket, it’s not difficult to google specific chat examples on the Internet

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question