I have just dived into the world of web development and started with basics of PHP and MySQL. My assignment included a question where we had to send a request to the server (I was using XAMPP) which would run a MySQL query with the database and return the results. While I did the question and echo
'ed the results of a select
query from the PHP on the client page when there was just one user (that is me), I wondered whether it was the right way to do it when there are multiple users using the application.
Is the server here doing extra processing viz the echo
statements? Would returning the query results (an object in this case) to the client and let it render the HTML using AJAX, be a better option? If yes, then why? If no, then what could be a better way to implement this?
Apologies if it's too basic.
Aucun commentaire:
Enregistrer un commentaire