thomaszhwang
asked on
Put several query result in one JSON file using PHP
I am using a PHP file to generate JSON files. Now I have three queries. I generate one JSON file for each of the queries.
I'm just wondering if it is possible to generate one JSON file for all three queries.
Following is the code I use to generate JSON files. Thanks.
I'm just wondering if it is possible to generate one JSON file for all three queries.
Following is the code I use to generate JSON files. Thanks.
$arr = array();
$rs = mysql_query("
SELECT
Column
FROM
Table;
");
while($obj = mysql_fetch_object($rs)) {
$arr[] = $obj;
}
ASKER
What's $result1 here? Same as the $rs in my example?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks.
Open in new window