Hey. I want to log anonymous user data to collect statistics. Without a database, as I understand it, I can not do. Well, in the end, I have no experience with the database, so I would like to begin to learn this part of the programming. What can you advise? It is highly desirable that the data in the database can be sent directly from the JS-code. NoSQL? Thank.
1 answer
Available in HTML5 Web SQL. You can use local storage. If only IE is used, then it is possible to access MsSQL via COM objects, and probably not only.
- You probably did not understand the problem. I want to view the actions of users in the admin. And for this, they must be recorded in the database, and at the entrance to the admin from there to get. - JamesJGoodwin
- @JamesJGoodwin, do you want to record user actions in the application in the browser, while the browser application itself directly writes data to the DBMS on the server? - GlWhitefoot
- no not like this. For example, the user has performed some kind of search on the site with a query, for example
?query=пиво. Search is performed via ajax request. So, when the user clicked on the "Search" button, I want to use JS to take aпивоsearch query and put it into the database. - JamesJGoodwin - Clearly, in this case, you write a small system of logging various events and actions that you need on js, this system will form an ajax request to your server, on which the handler will already work, which will put your data anywhere. Naturally, if you use the nodejs server, then it is better to store in MongoDB, if php, then MySQL or just in files with arrays serialized. And about direct recording in the DBMS from the client and speech can not go. - GlWhitefoot
|