The following assumes an installation version of 1.2.0. It also makes the assumption that you do not want your installation to live in a folder named ‘magento,’ but rather your web root folder. SSH into your server and navigation to your web root ...
Since Magento uses an EAV (Entity Attribute Value) data model, raw SQL queries are (for most practical purposes) out the window. Therefore, this is a typical method of grabbing the collection of objects you are searching for: $products = ...
If you’ve got your Magento store setup, but none of your categories are showing up on the frontend of your site, then you may just need to tweak a couple settings. For the following I’m assuming you are only using the default one store on one web ...