Thread:Project:Support desk/retrieving text from database.. API vs Database calls

Hello,

On a custom Wiki, Ive created a form in which users can submit a name of a page. I want to retrieve the text of this page based on the page title. In the documentation, I found that I can either use the API or use custom Wikimedia functions to directly talk to the MySQL tables. Ive already managed to retrieve text based on the API, but I was wondering: Is this actually a good idea? It seems a bit strange to retrieve database text via cURL if I can also talk to mySQL directly.. and also, wouldn't this approach be slower?

Until now I didn't manage to retrieve text by directly retrieving data from the mySQL tables. All I have is the page title, but I cannot find how to get to the right entry in 'old_text' in the 'text' table. How can this be done? Thanks :]