Perform a Mysql Query using Joomla!
This is really actually meant for future reference for myself as lately I’ve been doing quite a lot of Joomla! mysql coding and have used the following code just short of 3million times.
What we do in the above code snippet is select a user_id from some_table (#__) is short for whatever your database table’s prefix is (Joomla! replaces this itself) and then we perform the query and return the row’s `id` into the $data variable.