Thanks Karoly and Justin. I'll try that when I get home. it will probably work I know \% and \\% does not. hadn't trie %% yet.<br>
<br>
<br><br><div><span class="gmail_quote">On 11/28/05, <b class="gmail_sendername">Justin Davies</b> <<a href="mailto:justin@buddyping.com">justin@buddyping.com</a>> wrote:</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>Just occurred to me, try %% instead.<font color="#0b314a" face="Verdana" size="3"><span style="font-size: 12.8px;"></span></font></div><div><br></div><div><span class="q"><font color="#0b314a" face="Verdana" size="3">
<span style="font-size: 12.8px;"><font color="#000000" face="Helvetica" size="3"><span style="font-size: 12px;">Justin<br></span></font></span></font><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><br></span><div><span class="e" id="q_107d77fd63034e41_2"><div><div>On 28 Nov 2005, at 15:24, Thomas G. Willis wrote:</div><br><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> <<a href="mailto:justin@buddyping.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
justin@buddyping.com</a>> 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><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><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><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><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>}<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" 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>