[development] module dev. mysql like operator problem.
Thomas G. Willis
tom.willis at gmail.com
Mon Nov 28 14:44:20 UTC 2005
I apologize if this isn't the right list. didn't know if this would be
support necessarily since it's a custom module.
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.
I can't get a query working using the like operator in drupal. the same sql
runs fine in in phpmyadmin.
not like will return results though weird. any ideas?
function _db_getartistlist($filter=''){
//Example $filter='A%';
/*filter not working yet ??*/
/*doesn't work*/
/*
if($filter!=''){
return db_query('select distinct artist from {mp3col_data} where
artist like \'' .$filter . '\' order by artist');
//return db_query('select distinct artist from {mp3col_data}
where artist like \'%s\' order by artist',$filter);
}else{
return db_query('select distinct artist from {mp3col_data} order
by artist');
}
*/
/*works*/
return db_query('select distinct artist from {mp3col_data} order by artist');
}
--
Thomas G. Willis
-----------------------------------------------
http://i-see-sound.com
http://tomwillis.sonicdiscord.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20051128/57d1c302/attachment.htm
More information about the development
mailing list