We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

daisuke103 on 02/19/08


Tagged

sql php textmate key new word criteria


Versions (?)


PHP Symfony クリテリア サンプル


Published in: PHP 


  1. // データベース検証 NGワード
  2. $c = new Criteria();
  3. // カテゴリに関係なくNGワードに登録されていてキーワードが重複するものを取り出す
  4. $c->add(KeywordsPeer::IS_VALID, 0);
  5. $c->add(KeywordsPeer::KEYWORD, $keyword);
  6. $ng_word = KeywordsPeer::doSelectOne($c);

Report this snippet 

You need to login to post a comment.