Fetch data from MySQL database with ejabberd and PHP

I have a question that no amount of google'ing seems to answer.

I have a client who has a website where users can login and CRUD (Create, Read, Update and Delete) scheduled appointments. The website is written in C# (I only know PHP).

The website does not use a local database where you could normally just write a SQL query to get user details, or a total list of appointments, but instead it uses ejabberd to communicate with multiple external databases. How does this work? I cant seem to find any good examples of using ejabberd to relay SQL queries, or reques data from a database which then returns a certain value or XML with some data in it.

I don't know if this makes any sense at all, maybe my client just haven't explained it right. But hours of searches leaves me emptyhanded, so now I turn the the community. Can any one point me in the right direction.

I need to find a way to make a website communicate with a database without ever writing a query on my webserver.

for example.

A user accesses the website.

The user enters their username and password in a form.

that data is sent with to a ejabberd server as a message.. something like "Logmein,username,password"

ejabberd then talks to the mysql database wich runs a query to se if the user should be logged in, and then it returns true or false

When loggend in i want to be able to get all data related to the user I just logged in.

Hope anyone out there can help me understand this. Is a bit out of my league.

Thanks.

Syndicate content