Select tables in asterisk

Please help me!
I don’t know, I write below command true or false in my extension.conf file

exten => s,n,MYSQL(Connect connid ${po_host} ${po_user} ${po_pass} ${po_db})

exten => s,n,MYSQL(Query resultid ${connid} SELECT\ TIMESTAMPDIFF(MINUTE,min(timestemp),max(timestemp))\ FROM\ my_table\ GROUP\ BY\ user_id)

Thanks in advance!

Who can help me? Please!

I don’t understand the question!

I want to ask the my mysql query command in IVR Programming is true or false?

I use 1.4.12 version of asterisk!

Thanks for help!

What do you mean by “true or false”?

When you are asking a question in a second language it is a good idea to explain things in a level of detail that wouldn’t be needed in your own language. (It is also sometimes worth repeating the whole question in your own language, but that depends on how likely it is that there is someone who can understand it. Again don’t try to make the question too short as it may be the other person’s second language.)

In particular, for whatever meaning you put on “true” and “false”, please explain exactly which part of the code leads you to be uncertain.

At the moment, I think you are not getting answers because none of the people here who have used SQL with Pidgin understand the question.

[quote=“david55”]What do you mean by “true or false”?

When you are asking a question in a second language it is a good idea to explain things in a level of detail that wouldn’t be needed in your own language. (It is also sometimes worth repeating the whole question in your own language, but that depends on how likely it is that there is someone who can understand it. Again don’t try to make the question too short as it may be the other person’s second language.)

In particular, for whatever meaning you put on “true” and “false”, please explain exactly which part of the code leads you to be uncertain.

At the moment, I think you are not getting answers because none of the people here who have used SQL with Pidgin understand the question.[/quote]

Thanks for your advice. It is difficult to explain for you my question. I have to programing a script to connect mysql and in my extension I wrote my sql query command below:

exten => s,n,MYSQL(Connect connid ${po_host} ${po_user} ${po_pass} ${po_db})

exten => s,n,MYSQL(Query resultid ${connid} SELECT\ TIMESTAMPDIFF(MINUTE,min(timestamp),max(timestamp))\ FROM\ my_table\ GROUP\ BY\ user_id)

In my bold line, I want that the maximum timestamp subtract minimum timestamp (timestamp is type of datetime), And I want to convert from type of datetime to minutes, in mysql I use TIMESTAMPDIFF.

But I want to ask that in my bold line, I don’t know the systax for the SQL String in IVR Programing…

You write
I have to programing a script
You can use AGI. AGI could be written in any script language. There you can do whatever you want.