I created my own table in Moodle DB and it works fine. Say this table is almost a copy of 'quiz_attempts' and I called it 'mytable'.
How do I get list (array, object) of field names of this table?
I want smth like:
$TableFields = $DB->WhatFunction?('mytable', [list_of_needed parameters]);
//In other word I want to create a new object with all values = NULL,
// So $TableFields is:
$TableFields->username = NULL;
$TableFields->quiz= NULL;
.......................................................
$TableFields->field_of_mytable= NULL;
I found get_indexes function, but after testing I see it doesn't meet my expectations..
Thanks!