Connecting to database and adding table

you know I am a new user of freepbx so sorry for my elementary questions.
I installed trixbox v.2.2.5 and it installed Asterisk 1.2.24 and freepbx on itself. now I want to create a table in its database and use it in by my extensions. can anybody help me how to start it?

I could connected to mysql, then I created a table and filled it,now how can I countinue writing this Dialplan that get a number from agent and if it matches with the field of my table playback “valid” ?

exten => 1000,1,Answer
exten => 1000,n,Wait(1)
exten => 1000,n,Playback(your-number)

This request is beyond the scope of FreePBX.
You want something that is way out of ordinary use.

Sorry, this is not an offense but if you want specific help I suggest that you try the support:

Sorry, once again, this is beyond the scope of FreePBX.
You are asking how to customize FreePBX in a very specific way.
To get professional help please follow this link:

Your code is not even close to what you need to do.

Mike is correct nobody is going to teach you how to code in a forum.

If you have a specific syntax question and you have done your homework you may get help in the Asterisk forums.

If you have a background in programming I would pick up a copy of Asterisk “The Future of Telephony” It is available as an ebook or hardcopy.

thank you very much,I have finded that ebook and it is very useful.