Getting started with..

Hello there,



As I'm still a student, I have 1 period of 10 weeks where I have to work for a company. Now I got this project where I have to make an addon that makes it possible to load database information into a file, that will be send by e-mail. As I'm totally new to making addons and PHP, this project will cover the full 10 weeks.



I have a basic knowledge of SQL but I have problems with PHP. It's easy for me to write a SQL statement where I SELECT something for example, but when I have to do it in the addon, it just doesn't work. I have tried multiple things, but I just don't get it working. I ask you to give me just a few basic examples to get data from a database, which I will study and, when I understand, use in my future addon to get it working.



Thanks in advance!