Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
I am looping over all comments posted by the Author of a particular post. foreach($post->user->comments as $comment) { echo "<li>" . $comment->title . " (" . $comment->post->id . ")</li>"; } This gives me I love this post (3) This is a comment (5) This is the second Comment (3) How would I order by the post_id so that the above list is ordered as 3,3,5
ããã«ã¡ã¯ï¼ã¨ã³ã¸ãã¢ã®ãªã¼ã¿ã±ã§ãï¼ ã¿ãªããã¯ã¢ãã«ã§ãã¼ã¿ãåå¾ããéã«è¤éãªå½¢ã§åå¾ãããå ´åãããã¾ãããï¼ ä¾ãã°ãããã°ã®ãããªWebã¢ããªã±ã¼ã·ã§ã³ãä½ãéã«ç¹å®ã®æ稿è ãæ¸ããè¨äºä¸è¦§ãåå¾ãããå ´åã¯ã©ã®ããã«ããã°ããã§ããããï¼ ããã§ä»å㯠ãªã¬ã¼ã·ã§ã³ã¨ã¯ï¼ ITç¨èªè¾å ¸ã«ã¯æ¬¡ã®ãããªè¨è¼ãããã¾ãã ãªã¬ã¼ã·ã§ã³ã¨ã¯ãé¢ä¿ã¢ãã«ã«ããã¦ããã¼ã¿ãé¢é£ä»ãã¦ããå±æ§ã®éåã®ãã¨ã§ããã é¢ä¿ãã¼ã¿ãã¼ã¹ã®èæ¡è ã§ããã¨ãã¬ã¼ã»ã³ããï¼Coddï¼ã«ãã£ã¦æå±ããããã³ããã®12ã®æ³åãï¼Coddâs 12 Rulesï¼ã«ç»å ´ããæ¦å¿µã§ãä»æ¥ã®é¢ä¿ãã¼ã¿ãã¼ã¹ã«å¤å¤§ãªå½±é¿ãä¸ãã¦ããåºç¤çæ¦å¿µã®ã²ã¨ã¤ã¨ãªã£ã¦ããã ã¡ãã£ã¨ããããããªãã§ãããï¼ ç°¡åã«è¨ãã°åããããªé¢ä¿æ§ã®ã¢ãã«(ãã¼ãã«)ã¨ã¢ãã«(ãã¼ãã«)ãé£æºãã¦æ±ããã¨ã ã¨ç解ãã¦ããã ããã¨ãããã
社å åå¼·ä¼è³æ 追è¨: 2013-10-31 ã¤ãã£ãã§ææ( https://twitter.com/akuraru/status/395822183777202176 )ãåããã®ã§å ¥ãåéåã®ãã¼ã追å ã®èª¬æã®æãä¿®æ£ãã¾ãããRead less
çããããã«ã¡ã¯ãR&Däºæ¥é¨ ãã£ã³ã¦ã¯ã§ãã ä»æ¥ä»ããããªãã¡ãã®æ稿ã§ããã¬ã¼ããã¥ã¼ããã¦ããã ãã¾ãã ç§ã®æ稿ã§ã¯ä¸»ã«ã·ã¹ãã éçºæã®ã¨ãã½ã¼ããåå¼·å 容ã«ã¤ãã¦ã話ãããã¨æãã¾ãã ãã¦ãçãããã2038å¹´åé¡ãã¯ãåç¥ã§ããããã åè³ã®æ¹ãããã£ãããã¨æãã¾ããã ä»åã¯ä¸éã«2038å¹´åé¡ã¨ãã¦ç¥ããã¦ãããã°ãå¦çã解決ããäºä¾ãç´¹ä»ãã¾ãã â æ¦è¦ ä»ãR&Dã§ã¯ç¤¾å ã§ä½¿ã ãæ¥åæ¯æ´ãã¼ã«ããéçºãã¦ããã¾ãã å ¨ç¤¾å¡ã®æ¥ã ã®æ¥åãæ±ããããã«ã¬ã³ãã¼ã使ã£ããã¼ã¸ãå¤ãã§ãã â åé¡çºè¦ å®è£ ããã«ã¬ã³ãã¼ã®åä½ãã¹ããè¡ã£ã¦ããéããããªè¡¨ç¤ºãã§ã¾ããã !?!? 2038å¹´1æã®æ¬¡ã¯ã1970å¹´1æ!? ä¸ä½ã©ããããã®ã§ããããã åæãã¦ã¿ã¾ãããï¼ â åå åæ æ¥åæ¯æ´ãã¼ã«éçºã§ã¯ãæ¥ä»ã®èª¿æ´ãããããã«PHPï¼Webéçºã§ãã使ç¨ãã
ã¯ããã« ï½ç´ æ´ããããèåã®ç´¹ä»ã¨å¾çºå£ååã®åå¨ï½ ã¿ãªãããåç¥ãã¨æãã¾ãããããã®ãã®å±±ã1ã¨ããç´ æ´ããããèåãããã¾ããæ ªå¼ä¼ç¤¾ææ²»æ§ã1975å¹´ãã製é ã»è²©å£²ããã¦ãããã§ã³ã¬ã¼ãã¹ããã¯èåã§ãããã®ãã®ãããªå¯æããããã©ã«ã ã§ãèã®é¨åãã¯ã©ãã«ã¼ãåã®é¨åããã§ã³ã¬ã¼ãã«ãªã£ã¦ãã¾ãã 5å¹´ãã®éçºæéãããã¦ãã¹ããªçµã¿åããã試è¡é¯èª¤ãããã¨ã®ãã¨ã ããã£ã¦ãæã¡ãããæ©è½çã§ãããªããããã£ã·ãã¨ä½¿ããããã§ã³ã¨ãç¨ããå¡©å³ã¨ãµã¯ãµã¯æã®ã¯ã©ãã«ã¼ãåããããè³ä¸ã®å³ãããå®ç¾ãã¦ãã¾ãããã®ãããªç´ æ´ããããèåãçã¿åºãã¦ãã ãã£ãææ²»æ§ã«ã¯æ¬å½ã«é ãä¸ããã¾ããã ä¸æ¹ã§ããã®ççºçããããåãã¦4å¹´å¾ã«ãããã®ãã®éããªãé¡ä¼¼ç²æªåãç»å ´ãã¾ããããã¡ãã¯éçºæéãçããã¨ããã£ã¦ãããã§ã³ã¯ç´30%æ¸ããããåå°ã¯ãã½ãã½ã¨ç²ã£ã½ãæã¡ã¥ããã¯ãã
åæ© atomãåå(ãªã¬ãã£)ããµãã¼ããããã¨ã«ã¨ããªã£ã¦, fi, ftã®ãããªæåãå ¥åããå ´åã«1æåå¹ ã§æ±ããã. ãã®ãã, ãã以éã®åãè¡ã®æåããªã¬ãã£ããµãã¼ãããªãç°å¢ã§ã¿ãã¨ãã«, ã¨ãã£ã¿ä¸ã§ã®è¡¨ç¤ºãã1æååãããç¶æ ã«ãªã. ããã«ãã, è¤æ°è¡ã®ã³ã¼ãã§, ã³ã¼ãã®æ´å½¢ãè¡ã£ãå ´åãªã©ã«, ã³ã¼ããæå³ããã¨ããã«æ´å½¢ãããªããã¨ãããã. è§£æ±ºæ¹ ãªã¬ãã£ã®ãµãã¼ããç¡å¹ã«ãããã¨ã§, åé¡ãåé¿ãããã¨ãã§ãã. https://github.com/atom/atom/issues/3821#issuecomment-249427387
Atomã§ä½æ¥ãé²ãã¦ããã¨ããUTF-8ãã®ãã¡ã¤ã«ãä½æ ããwindows1252ãã§éããã¦ãã¾ããã¨ãããã¾ãã ç¹ã«æ¥æ¬èªãå°ãã ãå«ãå ´åã«çºçããã±ã¼ã¹ãå¤ãããã§ãã ãå°ãã ããã¨ããã®ãåä»ã§ãæ¬æ¥UTF-8ã§ããã¯ãã®ãã®æ¥æ¬èªé¨åãwindows1252ã§æååããã¦è¡¨ç¤ºããã¦ãã¾ãã¾ãããã®ä¸ããã®ã¾ã¾æ°ã¥ããã«ä¸æ¸ããã¦ãã¾ããå±éãã¦ãã¾ãã¨ããå±éºãªã±ã¼ã¹ãå®éã«èµ·ããã¾ããã 以åã¯ãããªãã¨ãªãã£ãã®ã§ãããæè¿ã¯é »ç¹ã«çºçãã¦ãããããªæ°ããã¾ãã 解決æ¹æ³ã«ã¤ãã¦ãæ®æ®µã¯ç§ã¯æ¥æ¬èªãã¡ã¤ã«ã«å¯¾å¿ããããã«auto-encodingã¨ãããã©ã°ã¤ã³ãå©ç¨ãã¦ããã®ã§ããããã®è¨å®ã§åé¿ã§ããããã§ãã ã¡ãªã¿ã«ãç§ã®ç¾å¨ã®ç°å¢ã¯ä»¥ä¸ã®ã¨ããã§ãã Windows 10 Home Atom 1.18.0 auto-encoding 0.7.0 Atomã
ã³ããã¦ã¤ã«ã¹å¯¾çãæ¤å¯éæ³äººäºãæ¡ãè¦ãä¼ãããã æè¿ã®æ¿åºå¯¾å¿ã§ããããå®åæä¸ã¨ããæ¿æ²»å®¶ãç¡è½ã§ããã¨ãããã¨ã«æ°ã¥ãã人ãå¢ããããã ã ããã§ããã¨æªã ã«æè·ãã¦ããã®ã¯èªç§°ä¿å®ç³»è«å£äººã®ä¸ã§ãå°å·æ¦®å¤ªéæ°ãããã®ãã®ã ã å½¼ã¯ãããæå¾ã¾ã§å¿ä¸ããã¨ããææ°è¾¼ã¿ã¯ãããè©ä¾¡ã§ããã ããã ãã¦ãåé¡ã¯ä»é ã«ãªã£ã¦å®åæä¸ã¨ããæ¿æ²»å®¶ãç¡è½ã ã¨æ°ã¥ãã人ã ã ããã¾ã§ãããã§ãç¡è½ã ã¨æ°ã¥ããã£ã³ã¹ããã£ãã«ãé¢ããããæ³æ²»å½å®¶ã¨ãã¦ä½ããªããªãã¬ãã«ã¾ã§æ²¡è½ãã¦ããããæ°ã¥ãã®ã¯éºæ¾ã§ã¯æ¸ã¾ãªãã¬ãã«ã ã¨è¨ããã ãããæé ããã§ããã®ã¯ééããªããããããã§ä¸åº¦ç¡è½ã ã¨æ°ã¥ããã¿ã¤ãã³ã°ã«ã¤ãã¦å¾©ç¿ãããã¹ãã¿ã¤ãã³ã°ãããããªãã æ¬æ¥ã¯æ¹ãã¦å®åæä¸ã¨ããæ¿æ²»å®¶ã®ç¡è½ãè£ä»ããä¸æ¦ããç´¹ä»ãããã ããã«ãã£ã¦ããªãã§ãã®ææ°ã¥ããªãã£ããã ãã¨ããåçããããã£ãã
èºçãæªåããã¨ãå¾ã ã«å¼å¸å°é£ã«ãªãã¾ãã ããã¨é ¸ç´ ãä½å ã«ååã«åãå ¥ããããªããªãããã¢ãã¼ã¼ãèµ·ãã¾ãã å¥åº·ãªäººã¯å£åãæå ãçªï¼ã¤ãï¼ã¯ãã³ã¯è²ããã¦ãã¾ãããéç´«è²ã«ãªãã®ããã¢ãã¼ã¼ã§ãã ãã®ç¾è±¡ãèµ·ãã¦ãããããã ã¡ã«ææ¥è»ãå¼ãã§ãã ããã é ããæ©ãããæèã¬ãã«ãä½ä¸ããã·ã§ãã¯ç¶æ ï¼å縮æè¡å§90mmHg以ä¸ãããã¯æ¡å¼µæè¡å§60mmHg以ä¸ï¼ã¨ãªãã§ãããã ããããæ»ã¬ã¬ãã«ã®éçã®èºçã§ããå ã«æèä¸æã«ãªã£ã¦ãããèªåã§ã¯ææ¥è»ãå¼ã¹ãªãã§ãããæ¢ã«æé ãããç¥ãã¾ããã 次ã«ãå®éæã®å¼å¸æ°ã¨èæã調ã¹ã¦ãã ããã å¼å¸æ°ãï¼åéã«ï¼ï¼å以ä¸ããããã¯ãèæãï¼åéã«ï¼ï¼ï¼å以ä¸ãªãã°ããªãéçã§ãã ï¼äººã§ç é¢ã«ããããã«ãªãã£ããææ¥è»ãå¼ã³ã¾ãããã ã¡ãªã¿ã«ãï¼åéã«ï¼ï¼å以ä¸ï¼é »å¼å¸ï¼ããããã¯ãèæãï¼åéã«ï¼ï¼ï¼å以ä¸ï¼é »èï¼ãããã¨è»½
Laravel5ã®QueryBuilderã¯é常ã«ä¾¿å©ã§ãããè¤éãªwhereæ¡ä»¶ãæ¸ããã¨ããã¨whereRawã«é ¼ã£ã¦ãã¾ããã¡ã§ãã ãããå¯èªæ§ãä¿ã¤ãããªãã¹ãwhereãorWhereã§æ¸ããæ¹ãè¯ãã¨æãã¾ãã åç´ãªAndæ¤ç´¢ã§ããã°ã $query->where('column1', '=', $value1) ->where('column2', '=', $value2) åç´ãªOræ¤ç´¢ã§ããã°ã $query->where('column1', '=', $value1) ->orWhere('column2', '=', $value2) ããããLaravel5ãå§ããã°ããã®äººãå¿ ãæ©ãã®ã(A or B) and (C or D)ã®æ¡ä»¶ã§ãã ãããã£ãè¤åç³»ã¯æ¬¡ã®ããã«ã¯ãã¼ã¸ã£ã§æ¸ãã¾ãã $query->where(function($query) u
SEOæ å½ã®èµ¤ï¨ã§ãã WEBãµã¤ããéå¶ãã¦ããã¨ãæµå ¥æ°ã伸ã³ãªããããããªäººã«è¦ã¦ãããããã®ã«ãªããªãç¥å度ãä¸ãããªããªã©ãæ©ãã§ããæ¹ãå¤ãã¨æãã¾ããä»åã¯ãSNSã§å¤ãã®æ¹ã«ç®ã«ãã¦ããããç¥ã£ã¦ãããããã«å¤§åãªOGPè¨å®ã«ã¤ãã¦ã説æãã¾ãã OGPã®ã¡ãªãããè¨å®æ¹æ³ã«ã¤ãã¦ããã¡ãã®åç»ã§ããããããã解説ãã¦ãã¾ãã è¨äºã¨ãããã¦ãã²ã覧ãã ããã OGPã£ã¦ãªãã®ãã¨ï¼ OGPã¨ã¯ããOpen Graph Protcolãã®ç¥ã§FacebookãTwitterãªã©ã®SNSã§ã·ã§ã¢ããéã«ãè¨å®ããWEBãã¼ã¸ã®ã¿ã¤ãã«ãã¤ã¡ã¼ã¸ç»åã詳細ãªã©ãæ£ããä¼ããããã®HTMLè¦ç´ ã§ãã SNSä¸ã§URLãå ±æãããéã«è¨å®ãã¦ãããã¿ã¤ãã«ãç»åã説ææãªã©ã表示ãããããã«ãªããã¦ã¼ã¶ã¼ã«å¯¾ãã¦WEBãã¼ã¸ã®å 容ã詳ããä¼ãããã¨ãã§ãã¾ãã ä¾ãã°ãå¼ç¤¾ã®ããã°
ãããªæã㧠~~~ mysql> ALTER TABLE table_name drop INDEX idx_id; Cannot drop index âidx_idâ: needed in a foreign key constraint ~~~ ã¨åºã¦ãã¾ããindexãåé¤åºæ¥ã¾ããã ã©ãããå¤é¨ãã¼ãå½±é¿ãã¦ããã¿ããã§ã å¤é¨ãã¼ã®ç¢ºèª ~~~ mysql> SHOW CREATE TABLE table_name; â- çç¥ â- CONSTRAINT `table_name_ibfk_1` FOREIGN KEY (`id`) REFERENCES `foreign_table` (`id`) ON DELETE CASCADE ON UPDATE CASCADE â- çç¥ â- ~~~ å¤åããã¤ãåå ã§ãã ãã¨ã§æ»ããªããè¡ããªãã®ã§ã³ãã£ã¦ããã¾ã å¤é¨ãã¼
#æåããè¡æ«ã¾ã§ã -- ã·ã¼ã±ã³ã¹ããè¡æ«ã¾ã§ã MySQL ã§ã¯ã-- (äºéããã·ã¥) ã®ã³ã¡ã³ãã¹ã¿ã¤ã«ã¯ã2 çªç®ã®ããã·ã¥ã«å°ãªãã¨ã 1 ã¤ã®ç©ºç½ã¾ãã¯å¶å¾¡æå (空ç½ãã¿ããæ¹è¡ãªã©) ãç¶ããå¿ è¦ãããã¾ãã ã»ã¯ã·ã§ã³1.7.2.4ãã³ã¡ã³ãã®å é ã¨ãã¦ã®ã--ããã§è¿°ã¹ã¦ããããã«ããã®æ§æã¯æ¨æº SQL ã®ã³ã¡ã³ãã®æ§æã¨ã¯å°ãç°ãªãã¾ãã C ããã°ã©ãã³ã°è¨èªã®ããã«ã/* ã·ã¼ã±ã³ã¹ãã次㮠*/ ã·ã¼ã±ã³ã¹ã¾ã§ã ãã®æ§æã§ã¯ãéå§ã¨çµäºã®ã·ã¼ã±ã³ã¹ã¯åãè¡ã«ããå¿ è¦ã¯ãªãã®ã§ãè¤æ°ã®è¡ã«ããã£ã¦ã³ã¡ã³ããè¨ããã¨ãã§ãã¾ãã 次ã®ä¾ã«ã¯ã3 ã¤ã®ã³ã¡ã³ãã¹ã¿ã¤ã«ããã¹ã¦ç¤ºããã¦ãã¾ãã mysql> SELECT 1+1; # This comment continues to the end of line mysql> SELECT 1+1; --
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}