Hi,
My php page below outputs my 40000 record list from my database in JSON format
In Dashcode, I have added a list, loaded my datasource assigned TEXT to the list binding to rsCounty and when I test in simulator, it errors: Execution exceeded timeout
Is this because I am selecting * from database because when I only SELECT DISTINCT rsCounty it works and shows my list?!
Can someone please help?!
thanks
php
My php page below outputs my 40000 record list from my database in JSON format
In Dashcode, I have added a list, loaded my datasource assigned TEXT to the list binding to rsCounty and when I test in simulator, it errors: Execution exceeded timeout
Is this because I am selecting * from database because when I only SELECT DISTINCT rsCounty it works and shows my list?!
Can someone please help?!
thanks
php
Code:
$db = dbConnect();
$query = "SELECT * FROM pubs WHERE rsCounty IN (SELECT DISTINCT rsCounty FROM pubs) ORDER BY rsCounty ASC";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$json_data[] = array ('PUBID'=>$row['PUBID'],'County'=>$row['rsCounty'],'Town'=>$row['rsTown'],'PubName'=>$row['rsPubName'],'PubAddres'=>$row['rsAddress']);
}
echo json_encode($json_data);