Guest User

Untitled

a guest
Apr 24th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. <?php
  2. /*
  3. IPHONE SERVICE SERVER PART
  4.  
  5. */
  6. if ($dbg == "1")
  7. {
  8. print("Hello World");
  9. print_r($_GET);
  10. }
  11. $dbg = $_GET['dbg'];
  12. $ct_id = (int)$_GET['CID'];
  13. $link = mysql_connect(' PASSWORD INFO NOT FOR YOUR EYES!! ' )
  14. or die("ERROR Could not connect: " . mysql_error());
  15. //if ()
  16. if ($dbg == "1")
  17. print ("Connected successfully <br>\n");
  18.  
  19. mysql_select_db('flowerserv_shop', $link)
  20. or die ('Can\'t use flowerserv_shop : ' . mysql_error());
  21. if ($dbg == "1")
  22. print ("DB select flowerserv_shop successfully <br>\n");
  23.  
  24.  
  25. $result = mysql_query("SELECT * FROM products_to_categories AS pc JOIN products ON pc.products_id = products.products_id JOIN products_description AS pd ON pd.products_id = products.products_id WHERE pc.categories_id = $ct_id AND pd.language_id = 4", $link)
  26.  
  27. while ($row = mysql_fetch_array($result))
  28. {
  29. $finalRes[] = $row;
  30. }
  31. if ($dbg == "1")
  32. print_r($finalRes);
  33. print(json_encode($finalRes));
  34. mysql_close($link);
  35. ?>
Add Comment
Please, Sign In to add comment