$wpdb
is a relatively simple wrapper around PHP’s mysql
functions. If you can do it with PHP/SQL then you can do it with $wpdb
.
You’re question is not detailed or specific enough to afford a more detailed answer though. Nor is it detailed enough to say whether $wpdb
is the best, or even an acceptable` way to do what you are trying to do.
Edit the question and I will edit the answer.