7 query
="SELECT $field FROM auth_user_md5 AS u "
11 query
="$query INNER JOIN search_name AS sn${pos} ON (u.user_id = sn${pos}.uid) "
12 [ "$where" != "" ] && where
="$where AND"
13 where
="${where} sn${pos}.token LIKE \"${i}%\""
16 if [ "${promo}" != "" ] ; then
17 [ "$where" != "" ] && where
="$where AND "
18 where
="${where} u.promo = $promo"
20 query
="${query} WHERE ${where} GROUP BY u.user_id"
22 echo $query | mysql
--default-character-set
=utf8
-N x4dat