FrontlineSMS allows you to text message with large groups of people anywhere there is a mobile signal.
*it included some fruites with price
*no
*oracle
*ya i can
Tags:

Permalink Reply by Alex Anderson on January 24, 2011 at 6:31am Thanks for answering my query at http://frontlinesms.ning.com/forum/topics/2052630:Topic:8063?commen...
You can use the external command functionality in FrontlineSMS to call a script. You will then need to write a script to query your database and pass the result back to FrontlineSMS.
Permalink Reply by mahantesh b waddar on January 25, 2011 at 4:07am thanks for ur kind reply.......I used wamp software to my data base. n i got reply back from FSMS
but speed s very low. can u plz tell me how can i achieve great speed.....

Permalink Reply by Alex Anderson on January 26, 2011 at 5:12am Hi Mahantesh,
If you can give some more detail on your exact setup, which part of the system is working slowly, and how slowly it is working then maybe we can help.
Thanks!
Alex
Hi alex,am yet to be conversant with the http trigger. when i send sms to FLSMS i get a blank autoreply sms from FLMS. where might be the problem? even when i have checked the 'include the command response'
The configuration is as follows:
FRONTLINE CONFIGURATION:
SERVER URL: http://localhost/htdocs/market.php? $keyword
KEYWORD:MARKET (TABAKA)
BELOW IS THE PHP SCRIPT:
<?php
$server="localhost";
$user="root";
$pass="NANOTECHZ";
$db="bidhaa";
$market=$_GET['TABAKA'];
mysql_connect("$server","$user","$pass");
mysql_select_db("$db") or die('CANNOT CONNECT TO MYSQL DATABASE');
$query = mysql_query( "SELECT * FROM `prices` WHERE market=\'TABAKA\';)");
$msg=$market;
While ($result=mysql_fetch_array($query,MYSQL_ASSOC))
{
$msg= $msg." ".$result['maize']." ".$result['onions']." ". $result['rice']."";
}
echo $msg;
?>
MYSQL CONFG:
dbname:bidhaa
table: prices
fields: id|MARKET|MAIZE|ONIONS|RICE|
1|TABAKA|50.00|200.00 |200 |
Thanks in advance.
Permalink Reply by Morgan Belkadi on March 14, 2011 at 5:44am Hi,
there are a few mistakes here.
First of all, your sql query isn't dynamic, as you always pass 'TABAKA' as the product name. Change it so it looks like:
$query = mysql_query( "SELECT * FROM `prices` WHERE market=\'$market\';)");
Then, you can see your $market variable is getting the value of the 'TABAKA' parameter. But you never fill it when calling your script. Start by renaming it like this:
$market=$_GET['product'];
The FrontlineSMS http request should look like this:
http://localhost/htdocs/market.php?product=${message_content}
Then the users should send this kind of SMS:
MARKET TABAKA
MARKET RICE
Hope that helps.
Morgan

Permalink Reply by Alex Anderson on March 14, 2011 at 7:26am
Permalink Reply by Morgan Belkadi on March 14, 2011 at 10:48am Hi Morgan,
i tried to edit the script,but frontline sends a blank sms as an autoreply when i send a message with the keyword 'MARKET' or 'RICE'.below is the edited script:
WHERE MIGHT BE THE PROBLEM? Help to edit please.
<?php
$server="localhost";
$user="root";
$pass="NANOTECHZ";
$db="bidhaa";
$market=$_GET['product'];
mysql_connect("$server","$user","$pass");
mysql_select_db("$db") or die('CANNOT CONNECT TO Bidhaa DATABASE');
$query = mysql_query( "SELECT * FROM `prices` WHERE market=\'$market\';)");
$msg=$market;
While ($result=mysql_fetch_array($query,MYSQL_ASSOC))
{
$msg= $msg." ".$result['maize']." ".$result['onions']." ".$result['rice']." ";
}
echo $msg;
?>
the frontline confg is:
http://localhost/htdocs/market.php?product=${message_content}
(i am using xampp server)
HOW I WANT IT TO BE:
when FLSMS recieves an sms with a keyword either the name of the market for example 'TABAKA', or the name of the commodity e.g. 'MAIZE' , it calls the php script which returns the various commodity prices which FLSMS inturn sends the result to the sender as an autoreply.
THIS IS THE 'PRICES' TABLE:
| id | MARKET | MAIZE | ONIONS | RICE | |||
|---|---|---|---|---|---|---|---|
| 1 | TABAKA | 50 | 200 | 180 | |||
| 2 | RONGO | 55 | 220 | 185 | |||
| 3 | SUNEKA | 60 | 250 | 190 | |||
© 2013 Created by kiwanja.net.
Powered by