Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sDBServer = 'localhost';
- $sDBName = 'admin_hdshop';
- $sDBUsername = '';
- $sDBPassword = '';
- $id = 1; // Or $_POST or w.e
- $oLink = mysql_connect($sDBServer,$sDBUsername,$sDBPassword);
- mysql_select_db($sDBName) or die('Unable to open database');
- $result = mysql_query("select `order_product_id,data` from `uc_order_products' where `order_id`='".$id."'");
- if (mysql_num_rows($result)>0) {
- $rArray = mysql_fetch_array($result);
- foreach ($rArray as $r) {
- $data = unserialize($r);
- // handle return
- }
- mysql_free_result($result);
- } else {
- die('No results returned'); // Prolly other handling better here
- }
Add Comment
Please, Sign In to add comment