Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fuction.php
- <?php
- function getShop($Type, $limit)
- {
- /*This Function, connects to the database Virtual Campus and retrieves the video with the corresponding input paramter. */
- $dbconn = pg_connect("host=localhost port=5432 dbname=sdfds user=dsfd password="dgdsf")
- or die('Could not connect: ' . pg_last_error());
- echo "<b>conected to Database</b>";
- echo "</br>";
- echo "</br>";
- $videoquery = "SELECT st_x(transform(PP.way, 4030)) as longitude , st_y(transform(PP.way, 4030)) as latitude
- from planet_osm_point PP, shop SP
- where PP.osm_id = SP.osm_id
- AND SP.type = '$Type'
- limit $limit;";
- $result = pg_query($videoquery) or die('Query failed: ' . pg_last_error());
- $coord = pg_fetch_array($result, null, PGSQL_ASSOC);
- index.php
- <?php global $ShopType; Global $ShopLimit; $ShopType = $_GET['TypeShops']; $ShopLimit = $_GET['NumberShops'];
- $getShopType = getShop($ShopType, $ShopLimit);//$_POST['TypeShops'] ;
- print_r($getShopType);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement