Quote:
Originally Posted by kesandal
I'm getting the same error
TheMayham, please help us...
Edit:
I was able to fix the bug by myself.
For the other guys encountering the same problem:
1. open /pointmarket/market_store_purchases.php
2. search for
Code:
$cid = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "market_coupons WHERE id ='$getcoupon'");
- should be around line 25
3. replace it with
Code:
$cid = $vbulletin->db->fetch_array($vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "market_coupons WHERE id ='$getcoupon'"));
4. search for
Code:
$cid = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "market_coupons WHERE id='$getcoupon'");
Approx. Line 31
5. replace with
Code:
$cid = $vbulletin->db->fetch_array($db->query_read("SELECT * FROM " . TABLE_PREFIX . "market_coupons WHERE id='$getcoupon'"));
After this modification I was able to buy products
Question to Mayham:
shouldn't
Code:
$has_purchased = $db->num_rows($db->query_read("SELECT * FROM " . TABLE_PREFIX . "market_store_transactions
where userid='$userid' AND coupon='$cid[id]'"));
be changed to
Code:
$has_purchased = $vbulletin->db->num_rows($db->query_read("SELECT * FROM " . TABLE_PREFIX . "market_store_transactions
where userid='$userid' AND coupon='$cid[id]'"));
as well?
Best regards
Kesandal
|
Those changes were already applied to the next Beta I just forgot to mention it in this thread.
As for the number rows report, I believe the vBulletin syntax actually is preferred to use $db->num_rows over $vbulletin->db->num_rows; however, I've never been completely positive on that.