パーソナルツール
現在の場所: ホーム plone SNS風味 メンバー検索 searchForMembers のソース
書いた本
Plone 完全活用ガイド の Chapter 1, 2, 3, 11 を執筆しました。
plone のインストール、使い方から、機能・デザインのカスタマイズ、プロダクトの作り方まで、 plone のすべてがぎゅっと詰まっている書籍になっていると思います。
plone に興味がある人から、すでに使いこなしている方まで、ぜひ読んでみてください。
Plone 完全活用ガイドのサポートページ
ナビゲーション

 
文書操作

searchForMembers のソース

作成者 takanori 最終変更日時 2008年06月04日 12時38分

データベースから指定されたメンバー情報を検索するための Z SQL Method のソースコードです。

Click here to get the file

サイズ 1.7 kB - File type text/x-sql

ファイルのコンテンツ

select * from member
  <dtml-sqlgroup where>
    <dtml-if searchable_text>
      searchable_text like
      <dtml-sqlvar "'%' + searchable_text + '%'" type="nb" optional>
    </dtml-if>
  <dtml-and>
    <dtml-if id>
      id like
      <dtml-sqlvar "id + '%'" type="nb" optional>
    </dtml-if>
  <dtml-and>
    <dtml-if fullname>
      fullname like
      <dtml-sqlvar "'%' + fullname + '%'" type="nb" optional>
    </dtml-if>
  <dtml-and>
    <dtml-if kananame>
      kananame like
      <dtml-sqlvar "'%' + kananame + '%'" type="nb" optional>
    </dtml-if>
  <dtml-and>
    <dtml-if nickname>
      nickname like
      <dtml-sqlvar "'%' + nickname + '%'" type="nb" optional>
    </dtml-if>
  <dtml-and>
    <dtml-if email>
      email like
      <dtml-sqlvar "'%' + email + '%'" type="nb" optional>
    </dtml-if>
  <dtml-and>
    <dtml-if organization>
      organization like
      <dtml-sqlvar "'%' + organization + '%'" type="nb" optional>
    </dtml-if>
  <dtml-and>
    <dtml-if workplace>
      workplace like
      <dtml-sqlvar "'%' + workplace + '%'" type="nb" optional>
    </dtml-if>
  <dtml-and>
    <dtml-if telno>
      telno like
      <dtml-sqlvar "'%' + telno + '%'" type="nb" optional>
    </dtml-if>
  <dtml-and>
    <dtml-sqltest sex type="nb" optional>
  <dtml-and>
    <dtml-sqltest blood type="nb" optional>
  <dtml-and>
    <dtml-if location>
      location like
      <dtml-sqlvar "'%' + location + '%'" type="nb" optional>
    </dtml-if>
  <dtml-and>
    <dtml-if hometown>
      hometown like
      <dtml-sqlvar "'%' + hometown + '%'" type="nb" optional>
    </dtml-if>
  <dtml-and>
    <dtml-sqltest photo type="nb" optional>
  </dtml-sqlgroup>
  order by id

Powered by vine linux, python, zope, plone, coreblog