android - Parsing a query to php and returning result ERROR T_WHILE -
i trying send query app php code throgh post
<?php $con=mysql_connect("xxx","xxx","xxx"); if (!$con) { die('could not connect: ' . mysql_error()); } mysql_select_db("xxx", $con); $query=$_post['query']; $result = mysql_query({$query}) while($row = mysql_fetch_assoc($result)) { $output[]=$row; } print(json_encode($output));
i error:
error on line 15 unexpected t_while
looks you're missing semi-colon here:
$result = mysql_query({$query});
Comments
Post a Comment