Welcome Guest, Not a member yet? Register   Sign In
Can Not see sold coupon double digits on my daily deal site
#1

[eluser]Unknown[/eluser]
Hi all
I hope that someone can help me. I run a daily deal site, the coder I have working for me is having issues getting our coupon sold count to show double digits if you go to this link www.dealsgonesocial.com then look at "visit more cities" then click on Toronto - Golf you will see at the time of writing this it says 5 it should say 50 I can not figure it out. I pulled what I think is the right code but I am not sure, by the way I let the programmer go.
here is what I think the code is;

<div class="box2">
&lt;?php
//substr('abcdef', 0, 5); // bcd
$todayfinal='';
$todayid='';
$today=date("m/d/Y h:i A");
$today1=substr($today, 0, 5);
$sqldate="select order_purchase_date from dp_order ";
$r=mysql_query($sqldate);
while($re=mysql_fetch_array($r)){
$re1=substr($re['order_purchase_date'], 0, 5);
if($re1==$today1){
$todayfinal=$re['order_purchase_date'];
break;
}
}

$sqldate5="select order_id from dp_order where order_purchase_date='$todayfinal'";
$r5=mysql_query($sqldate5);
while($re5=mysql_fetch_array($r5)){
$todayid=$re5['order_id'];
}

$sql="select sum(order_count) as number1 from dp_order where order_id>='$todayid'";
$qrd=mysql_query($sql);
while($qrf=mysql_fetch_array($qrd)){
$number1=$qrf['number1'];
}

?&gt;
<div class="bought">&lt;?=(isset($deal_sold))?'':'0'; echo $number1;?&gt; bought </div>
<div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
&lt;?php if(isset($deal_end_time) && $deal_end_time >= time() && $cnt > 0){ //echo 'Sold='.$deal_sold.'Count='.$deal_count;
if($deal_sold>=$deal_count){?&gt;
<tr>
<td width="30%" align="right"><img >template_url?&gt;images/index_check_mark.png" alt="" width="27" height="28" hspace="4" title="" /></td>
<td width="70%"><strong>The deal is on! </strong></td>
</tr>
&lt;?php }?&gt;
<td width="30%" align="right">&nbsp;</td>
<td width="70%">&nbsp;</td>
</tr>
&lt;?php }
else{?&gt;
<tr>
<td width="30%" align="right">&nbsp;</td>
<td width="70%"><strong>The deal is closed </strong></td>
</tr>
&lt;?php }
?&gt;
</table>
</div>
</div>
</td>

I think it is this line
div class="bought">&lt;?=(isset($deal_sold))?'':'0'; echo $number1;?&gt; bought </div>
Which I think is wrong.
If you can help that would be fantastic


Messages In This Thread
Can Not see sold coupon double digits on my daily deal site - by El Forum - 04-01-2011, 02:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB