I've been out of the game for a while and have a few question I hope you guys and gals can answer. I've tried (re)searching it beforehand but didn't come to conclusive answers, so here I am.
SQL Queries
How many queries on a single page is considered a lot? I'm currently at around 6 or 7 on the page with the most queries, other pages have less. However, I am not done with coding yet, so I am guessing there will be a few more queries needed that can not be combined (atleast not easily) with the others. I've seen online that it heavily depends on database and server, others say it's better to have a few small ones, so thought I would straight up ask the phpBB community to get a more decisive answer. test anchor link
Language Error
While I love coding with phpBB and the error handling is quite fenomenal and easy to backtrace, it still baffels me that when you forget a single "," at the end of a line in a language file the entire page turns white. Fortunately it's the only error I know that causes this so it's still okay to backtrace. But perhaps a more suitable error handling is possible?
Empty controller response
Is it okay to send a response back like this:
return new \Symfony\Component\HttpFoundation\JsonResponse();
?I have an ajaxified rating system I'm working with and everything is handled with, I only need to add something to the database tables, so I need the php file. However, when I just use
return;
or return 0;
, or something similar it gives me an Internal Server Error 500. Adding this empty JsonResponse solves everything. Is this allowed?Sessions
How long does a user session exactly last? When I'm logged in and I have 'keep me logged in' enabled and come back the next day, am I still on the same session or on a new one? Or only when I'm logged out, either by self-doing or not visiting often enough? Just wondering cause I am storing a cookie per session, check on that cookie and increment a counter.
Sorry for the many questions and thanks in advance,
Kind regards,