Re: How to write a query | cakephp 3.x

2015-06-05 Thread InYan
I use classic php: $link = mysql_connect(localhost, $db, $psw) or die(No connect MySQL.); mysql_select_db($db) or die(No connect DB.); if(!empty($word_1)){$word_1 = kw LIKE '%{$word_1}%' ;}else{$word_1 = null ;} if(!empty($word_2)){$word_2 = AND kw LIKE '%{$word_2}%' ;}else{$word_2 = null

Migrations cake v.1.3 - v.3.x

2015-06-05 Thread InYan
https://lh3.googleusercontent.com/-2nzlMXaom3g/VXFLwLPOOjI/AQ0/3d473WJBcPo/s1600/qq.jpg Please suggest if there is an analogue of cakephp3 -- Continuing this question, please tell how to cakephp3 implement such a code: $this-Model-query(TRUNCATE TABLE models;) I found

Re: Migrations cake v.1.3 - v.3.x

2015-06-05 Thread euromark
This is all you need in your Table: https://github.com/dereuromark/cakephp-tools/blob/cake3/src/Model/Table/Table.php#L132 Am Freitag, 5. Juni 2015 09:16:44 UTC+2 schrieb InYan: https://lh3.googleusercontent.com/-2nzlMXaom3g/VXFLwLPOOjI/AQ0/3d473WJBcPo/s1600/qq.jpg Please suggest if

Re: Migrations cake v.1.3 - v.3.x

2015-06-05 Thread euromark
Basically $sql = $this-schema()-truncateSql($this-_connection); foreach ($sql as $snippet) { $this-_connection-execute($snippet); } Am Freitag, 5. Juni 2015 12:15:01 UTC+2 schrieb euromark: This is all you need in your Table: