

{"id":724,"date":"2015-08-31T18:09:57","date_gmt":"2015-08-31T09:09:57","guid":{"rendered":"https:\/\/curecode.jp\/tech\/?p=724"},"modified":"2015-10-13T15:53:22","modified_gmt":"2015-10-13T06:53:22","slug":"fuelphp-orm-search","status":"publish","type":"post","link":"https:\/\/curecode.jp\/tech\/fuelphp-orm-search\/","title":{"rendered":"FuelPHP\u3067Orm\u30e2\u30c7\u30eb\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u5148\u3092LIKE\u691c\u7d22\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>FuelPHP\u3067Orm\u30e2\u30c7\u30eb\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u5148\u3092LIKE\u691c\u7d22\u3059\u308b\u65b9\u6cd5\u3002\u30ad\u30fc\u30ef\u30fc\u30c9\u306e\u4e00\u90e8\u3067\u90e8\u5206\u4e00\u81f4\u691c\u7d22\u3057\u4e00\u89a7\u3092\u8868\u793a\u3059\u308b\u3082\u306e\u3092\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/curecode.jp\/tech\/fuelphp-orm-relation\/\" title=\"FuelPHP\u3067Orm\u30e2\u30c7\u30eb\u306e1\u5bfe1\u3067\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u305f\u8868\u3092\u7c21\u5358\u306b\u4e00\u89a7\u8868\u793a\u3055\u305b\u308b\u65b9\u6cd5\" target=\"_blank\">\u300cFuelPHP\u3067Orm\u30e2\u30c7\u30eb\u306e1\u5bfe1\u3067\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u305f\u8868\u3092\u7c21\u5358\u306b\u4e00\u89a7\u8868\u793a\u3055\u305b\u308b\u65b9\u6cd5\u300d<\/a>\u3067\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3055\u305b\u305f\u8868\u306b\u30ec\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u305f\u3082\u306e\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<table style=\"background:#fff; text-align:center; border:1px solid #000; width:100%;  border-collapse:collapse;\">\n<tr>\n<th style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888;\">name<\/th>\n<th style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888;\">hobby<\/th>\n<th style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888;\">favorite_food<\/th>\n<\/tr>\n<tr>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u5c71\u7530 \u592a\u90ce<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u30b5\u30c3\u30ab\u30fc<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u3046\u3069\u3093<\/td>\n<\/tr>\n<p>\u3000\u3000\u3000\u3000<\/p>\n<tr>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u7530\u4e2d \u82b1\u5b50<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u6620\u753b\u9451\u8cde<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u30d1\u30b9\u30bf<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u5927\u4e95 \u5927\u4e94\u90ce<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u6c34\u6cf3<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u8089<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u4e0a\u7530 \u4eac\u5b50<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u30d0\u30c8\u30df\u30f3\u30c8\u30f3<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u304a\u597d\u307f\u713c\u304d<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u4e2d\u6751 \u5e83<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u7d75\u753b\u5236\u4f5c<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u713c\u304d\u9ce5<\/td>\n<\/tr>\n<\/table>\n<p>\u6b21\u306b\u3001\u30d3\u30e5\u30fc\u3067\u691c\u7d22\u7a93\u3092\u4f5c\u308a\u307e\u3059\u3002\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u5148\u3092LIKE\u691c\u7d22\u3067\u304d\u305f\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" >&lt;?php echo Form::open(array('class' =&gt; 'form-horizontal'));?&gt;\r\n\t&lt;?php echo Form::input('name',Input::post(\"name\"),array('class' =&gt; 'form-control'));?&gt;\r\n\t&lt;?php echo Form::submit('submit', '\u691c\u7d22', array('class' =&gt; 'btn btn-success'));?&gt;\r\n&lt;?php echo Form::close();?&gt;<\/pre>\n<p>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306b\u30e1\u30bd\u30c3\u30c9\u30c1\u30a7\u30fc\u30f3\u3092\u4f7f\u3063\u3066LIKE\u691c\u7d22\u3067\u304d\u308b\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" >$query = Model_File::query();\r\n\r\nif(Input::post(\"name\")):\r\n\t$query-&gt;related('staff')-&gt;where('target.name','LIKE',\"%\".Input::post(\"name\").\"%\")-&gt;get();\r\nendif;\r\n\r\n$data['staffs'] = $query-&gt;get();<\/pre>\n<p>\u3053\u308c\u3067\u3001\u691c\u7d22\u7a93\u3067\u540d\u524d\u306e\u4e00\u90e8\u3092\u5165\u529b\u3057\u3066\u4e00\u89a7\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u300c\u7530\u300d\u3092\u5165\u529b\u3057\u3066\u691c\u7d22\u3059\u308b\u3068\u4e0b\u8a18\u306e\u3088\u3046\u306a\u4e00\u89a7\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<table style=\"background:#fff; text-align:center; border:1px solid #000; width:100%;  border-collapse:collapse;\">\n<tr>\n<th style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888;\">name<\/th>\n<th style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888;\">hobby<\/th>\n<th style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888;\">favorite_food<\/th>\n<\/tr>\n<tr>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u5c71\u7530 \u592a\u90ce<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u30b5\u30c3\u30ab\u30fc<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u3046\u3069\u3093<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u7530\u4e2d \u82b1\u5b50<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u6620\u753b\u9451\u8cde<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u30d1\u30b9\u30bf<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u4e0a\u7530 \u4eac\u5b50<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u30d0\u30c8\u30df\u30f3\u30c8\u30f3<\/td>\n<td style=\"font-size:14px; background:#fff; text-align:center; border:1px solid #888; padding:10px;\">\u304a\u597d\u307f\u713c\u304d<\/td>\n<\/tr>\n<\/table>\n<h3>IT\u30a8\u30f3\u30b8\u30cb\u30a2\u52df\u96c6\u4e2d\uff01<\/h3>\n<p>\u30ad\u30e5\u30a2\u30b3\u30fc\u30c9\u682a\u5f0f\u4f1a\u793e\u306fIT\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u52df\u96c6\u3057\u3066\u304a\u308a\u307e\u3059\u3002\u5c11\u4eba\u6570\u306e\u8077\u5834\u306a\u306e\u3067\u3001\u4e0a\u6d41\u30fb\u4e0b\u6d41\u3084\u30b5\u30fc\u30d0\u30fc\u30fb\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5bfe\u5fdc\u306e\u57a3\u6839\u306a\u304f\u3001\u3042\u306a\u305f\u306e\u5f37\u307f\u3092\u6d3b\u304b\u3057\u306a\u304c\u3089 \u3044\u308d\u3044\u308d\u306a\u3053\u3068\u306b\u30c1\u30e3\u30ec\u30f3\u30b8\u53ef\u80fd\u3067\u3059\u3002\u30a8\u30f3\u30b8\u30cb\u30a2\u3068\u3057\u3066\u306e\u672a\u7d4c\u9a13\u306e\u65b9\u3001\u7d4c\u9a13\u304c\u5c11\u306a\u3044\u65b9\u3082\u6b53\u8fce\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u3088\u308aIT\u30a8\u30f3\u30b8\u30cb\u30a2\u52df\u96c6\u306e\u63a1\u7528\u60c5\u5831\u3092\u3054\u89a7\u3044\u305f\u3060\u3051\u307e\u3059\u3002<\/p>\n<div class=\"curecode_recruit_bn\">\n\t\t\t\t<a href=\"https:\/\/curecode.jp\/recruit\/itengineer\/\" target=\"_blank\" rel=\"noopener noreferrer\"><br \/>\n\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/curecode.jp\/tech\/wp-content\/themes\/tech\/images\/it_recruit.png?20241220\" alt=\"\u4e8b\u696d\u62e1\u5927\u306b\u4f34\u3044\u65b0\u3057\u3044\u9818\u57df\u306b\u4e00\u7dd2\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u304f\u30e1\u30f3\u30d0\u30fc\u3092\u52df\u96c6\u3057\u307e\u3059\u3002\"  width=\"500\" height=\"180\"\/><br \/>\n\t\t\t\t<\/a>\n\t\t<\/div>\n<h3>\u30ad\u30e5\u30a2\u30b3\u30fc\u30c9\u516c\u5f0f\u30a4\u30f3\u30b9\u30bf\u30b0\u30e9\u30e0<\/h3>\n<p>\u30ad\u30e5\u30a2\u30b3\u30fc\u30c9\u682a\u5f0f\u4f1a\u793e\u306e\u65b0\u30b5\u30fc\u30d3\u30b9\u60c5\u5831\u3084\u3001\u30aa\u30d5\u30a3\u30b9\u30e9\u30a4\u30d5\u306e\u7d20\u6575\u306a\u77ac\u9593\u307e\u3067\u3002\u79c1\u305f\u3061\u306e\u65e5\u3005\u306e\u55b6\u307f\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<div class=\"curecode_recruit_bn\">\n\t\t\t\t<a href=\"https:\/\/www.instagram.com\/curecode\/\" target=\"_blank\" rel=\"noopener noreferrer\"><br \/>\n\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/curecode.jp\/tech\/wp-content\/themes\/tech\/images\/insta_bn.png?20241220\" alt=\"\u4e8b\u696d\u62e1\u5927\u306b\u4f34\u3044\u65b0\u3057\u3044\u9818\u57df\u306b\u4e00\u7dd2\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u304f\u30e1\u30f3\u30d0\u30fc\u3092\u52df\u96c6\u3057\u307e\u3059\u3002\"  width=\"500\" height=\"180\"\/><br \/>\n\t\t\t\t<\/a>\n\t\t<\/div>\n","protected":false},"excerpt":{"rendered":"<p>FuelPHP\u3067Orm\u30e2\u30c7\u30eb\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u5148\u3092LIKE\u691c\u7d22\u3059\u308b\u65b9\u6cd5\u3002\u30ad\u30fc\u30ef\u30fc\u30c9\u306e\u4e00\u90e8\u3067\u90e8\u5206\u4e00\u81f4\u691c\u7d22\u3057 [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":565,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[39,80],"class_list":["post-724","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fuelphp","tag-fuelphp","tag-orm"],"_links":{"self":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts\/724","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/comments?post=724"}],"version-history":[{"count":18,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts\/724\/revisions"}],"predecessor-version":[{"id":818,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts\/724\/revisions\/818"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/media\/565"}],"wp:attachment":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/media?parent=724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/categories?post=724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/tags?post=724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}