<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Thomas,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Just occurred to me, try %% instead.<FONT class="Apple-style-span" color="#0B314A" face="Verdana" size="3"><SPAN class="Apple-style-span" style="font-size: 12.8px;"></SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" color="#0B314A" face="Verdana" size="3"><SPAN class="Apple-style-span" style="font-size: 12.8px;"><FONT class="Apple-style-span" color="#000000" face="Helvetica" size="3"><SPAN class="Apple-style-span" style="font-size: 12px;">Justin<BR></SPAN></FONT></SPAN></FONT><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>--</DIV><DIV>t: CEO/CTO buddyPing</DIV><DIV>e: <A href="mailto:justin@buddyping.com">justin@buddyping.com</A></DIV><DIV>m: 07833 530876</DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR><DIV><DIV>On 28 Nov 2005, at 15:24, Thomas G. Willis wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">I bet it's escaping the percent sign. anyone know of a way to control that?<BR> <BR> I'm doing this on the cvs version forgot to mention that?<BR> <BR> <BR> On 11/28/05, <B class="gmail_sendername">Justin Davies</B> &lt;<A href="mailto:justin@buddyping.com">justin@buddyping.com</A>&gt; wrote:<DIV><SPAN class="gmail_quote"></SPAN><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Thomas,<DIV><BR></DIV><DIV>Not a huge amount of help, but may give you some pointers:</DIV><DIV><BR></DIV><DIV>Get the devel module and turn on query output.  You will be able to see exactly what is being sent to the database. </DIV><DIV><BR></DIV>  <DIV>The other thing is that db_query *might* be escaping the % character so it will never return a result unless you have an artist starting with A%.<BR>  </DIV> </BLOCKQUOTE><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><DIV>Justin<BR><SPAN class="sg"><DIV> <SPAN style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"> <DIV>--</DIV><DIV>t: CEO/CTO buddyPing</DIV><DIV>e: <A href="mailto:justin@buddyping.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">justin@buddyping.com</A></DIV><DIV>m: 07833 530876</DIV><BR> </SPAN> </DIV></SPAN><DIV><SPAN class="e" id="q_107d7737c06eea64_2"><BR><DIV><DIV>On 28 Nov 2005, at 14:44, Thomas G. Willis wrote:</DIV><BR><BLOCKQUOTE type="cite">I apologize if this isn't the right list. didn't know if this would be support necessarily since it's a custom module. <BR> <BR> I'm at a loss as to whether this is a bug or whether I'm just trying to do something I'm not supposed to.<BR> I can't get a query working using the like operator in drupal. the same sql runs fine in in phpmyadmin. <BR> <BR> not like will return results though weird. any ideas? <BR>  <BR> <PRE>function _db_getartistlist($filter=''){<BR>//Example $filter='A%';<BR>/*filter not working yet ??*/<BR><BR>/*doesn't work*/<BR>/*<BR>   if($filter!=''){
<BR>      return db_query('select distinct artist from {mp3col_data} where artist like \'' .$filter . '\' order by artist');<BR><BR>      //return db_query('select distinct artist from {mp3col_data} where artist like \'%s\' order by artist',$filter);
<BR><BR>   }else{<BR>      return db_query('select distinct artist from {mp3col_data} order by artist');<BR><BR>   }<BR>*/<BR><BR>   /*works*/<BR>   return db_query('select distinct artist from {mp3col_data} order by artist');
<BR>}<BR></PRE> <BR clear="all"><BR>-- <BR>Thomas G. Willis<BR>-----------------------------------------------<BR><A href="http://i-see-sound.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://i-see-sound.com </A><BR><A href="http://tomwillis.sonicdiscord.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://tomwillis.sonicdiscord.com </A><BR><BR><BR></BLOCKQUOTE></DIV><BR></SPAN></DIV></DIV> </BLOCKQUOTE></DIV><BR><BR clear="all"><BR>-- <BR>Thomas G. Willis<BR>-----------------------------------------------<BR><A href="http://i-see-sound.com">http://i-see-sound.com</A><BR><A href="http://tomwillis.sonicdiscord.com"> http://tomwillis.sonicdiscord.com</A><BR><BR><BR></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>