Guest User

Untitled

a guest
Jul 3rd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. $sDBServer = 'localhost';
  2. $sDBName = 'admin_hdshop';
  3. $sDBUsername = '';
  4. $sDBPassword = '';
  5.  
  6. $id = 1; // Or $_POST or w.e
  7. $oLink = mysql_connect($sDBServer,$sDBUsername,$sDBPassword);
  8. mysql_select_db($sDBName) or die('Unable to open database');
  9.  
  10. $result = mysql_query("select `order_product_id,data` from `uc_order_products' where `order_id`='".$id."'");
  11.  
  12. if (mysql_num_rows($result)>0) {
  13. $rArray = mysql_fetch_array($result);
  14. foreach ($rArray as $r) {
  15. $data = unserialize($r);
  16. // handle return
  17. }
  18. mysql_free_result($result);
  19. } else {
  20. die('No results returned'); // Prolly other handling better here
  21. }
Add Comment
Please, Sign In to add comment