Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Drupal 7 のデータベース API を使用して、タイトルが a、b、c、または z で始まらないすべてのレコードを取得するクエリを作成したいと考えています。
条件部分の記述に行き詰まりました: $query->condition(?)
助けてくれてありがとう!
乾杯。
解決策を見つけて動作しますが、エレガントに見えません。
$query -> where('SUBSTRING(n.title, 1, 1) not in (:letter)', array(':letter' => array('a','b','c','d','e','f','g','h','i','j', 'k','l','m','n','o','p','q','r','s','t', 'u','v','w','x','y','z')));