<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><br><div><div>On Oct 6, 2011, at 5:11 AM, Robert Buckley wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif; font-size: 13px; "><div>If I have multiple charts which use mulitple queries, am I able to put them in one php script or do I need a seperate script for each query?</div><div><br></div><div>Please excuse me if this should not be posted here...but I consider this more of a postgis/webmapping question as a sencha/extjs question.</div></span></span></blockquote></div><br></div></div><div>It's really a client side question, but I'll try explain.   If you currently get data for your charts using <div><br></div><div>chart1.php</div><div>chart2.php</div><div>...</div><div><br></div><div>and you are looking to consolidate and share code you can create one script with all the same common code that takes an argument to change the sql query for each chart. You'd then call it with  </div><div><br></div><div>chart.php?type=1</div><div>chart.php?type=2 <br><div><br></div><div>In your php you'd look at the type and modify the sql string used in the query. If the results/columns differ from the queries you'll need further logic to handle them differently by type.</div><div><br></div><div>hth</div><div>charles</div></div></div></body></html>