I have the following MySQL query in PHP:
function query taggable ($ tag) { Global $ Pado; $ Sql = "SELECT id, latitude, longitude, WHERE ID from TB (SELECT id FROM`tbl_tags` WHERE tag =: tag)"; $ Stmt = $ pdo- & gt; Ready ($ sql); $ Stmt-> gt; BindValue (': tag', $ tag); If ($ stmt-> Execute ()) {$ result = $ stmt-> Fatch ALL (); Forex currency ($ result as $ line) {echo $ line ['id']., '. $ Line ['latitude']. ',' $ Line ['longitude']. ' '; }}}
In my DB, I have the following result for the equivalent raw SQL query:
276 32.082504109184285 34.89628862589598
Still, counterattacking my PHP code always seems to target the results of latitude and longitude after the 12 decimal places:
276, 32.082504109184, 34.896288625896
In my DB, ID is an integral, while latitude and longitude is double. For the most accurate output I want to query PHP for returning the full value for latitude and longitude. What can I do to get the full value of these results from my PHP function? I suspect the problem is that there are different exact pairs of strings in MySQL and PHP;
SELECT id, CAST (latitude as latitude (32)) latitude, CAST (latitude AS (32)) As is the longitude ID from TBL (`tbl_tags` from WHOE tag =: tag selection id)