jquery - PHP Querying the database -


i in middle of self-project right , know basics of jquery/php/sql running problems on how set website. website functions quiz format users log in , answer questions. questions randomized , under right circumstance okay ask same user question have answered.

i have 3 tables users, knownquestions, , questions. looking advice on on how set tables up. direction towards readings me in this. have found covers basic tables small data sets. questions are:

is executing query each time there ajax call acceptable or there more efficient ways?

should queries select whole table , use jquery process information or should select specific results such 'select * questions qid = "01"'?

if not specific enough or generalized information, apologize. links,books, or other sources of research appreciated. thanks.

i grab page worth of questions... maybe 10 or whatever , associated question. tables users, questions, answers. setup relationship between answers , ids. give questions point value. make sure when grab data grab data going use. have status field in databases can soft delete record. if status = 0 deleted users... not need select * users display highscore table. select username, score users status != 0;

any other questions?


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -