[SOLVED] Correct way to retrieve data from SQL

Do you have any tips on backend database configuration?