More or less (probably much, much more) that's the code needed. But there is another technic I use, as far as the fields fetched by the database are fixed length. With just a select you can fill the ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results