<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Hi All,</DIV>
<DIV>I am using the function avp_db_query to query a table and fetch few values. The query is as follows:</DIV>
<DIV>"select subscriptionid, ip, media_status from domestic where prefix=$rU", "$avp(i:101), $avp(i:102), $avp(i:103)".</DIV>
<DIV>&nbsp;</DIV>
<DIV>Now the media_status column is a column with datatype as integer which will contain either 0 or 1. I need to check the value in this column so I use the following:</DIV>
<DIV>&nbsp;</DIV>
<DIV>if(avp_check("$avp(i:103)", "eq/0/i")) {</DIV>
<DIV>&nbsp;&nbsp;&nbsp; do certain things;</DIV>
<DIV>} else {</DIV>
<DIV>&nbsp;&nbsp;&nbsp; do certain things;</DIV>
<DIV>};</DIV>
<DIV>&nbsp;</DIV>
<DIV>Even when the value at media_status column is 0 it does not get into that condition, it always executes the else condition and I see the following in the logs:</DIV>
<DIV>ERROR:avpops:check_avp: value types don't match</DIV>
<DIV>&nbsp;</DIV>
<DIV>Can someone please help me to overcome this error. When I keep the datatype of media_status column as varchar it works fine, but I dont want to do that as that column is going to conatin only integer values.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks in advance.</DIV>
<DIV>&nbsp;</DIV>
<DIV>w/regards,</DIV>
<DIV>Jayesh</DIV>
<DIV>&nbsp;</DIV></div><br>


      <!--4--><hr size=1></hr> Forgot the famous last words? Access your message archive online. <a href="http://in.rd.yahoo.com/tagline_webmessenger_4/*http://in.messenger.yahoo.com/webmessengerpromo.php">Click here.</a></body></html>