{"action":"created","issue":{"url":"https://api.github.com/repos/brunosantoshx/treinamento-php-activerecord/issues/1","repository_url":"https://api.github.com/repos/brunosantoshx/treinamento-php-activerecord","labels_url":"https://api.github.com/repos/brunosantoshx/treinamento-php-activerecord/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/brunosantoshx/treinamento-php-activerecord/issues/1/comments","events_url":"https://api.github.com/repos/brunosantoshx/treinamento-php-activerecord/issues/1/events","html_url":"https://github.com/brunosantoshx/treinamento-php-activerecord/issues/1","id":160166895,"number":1,"title":"Utilizando variável em conditions com like %%","user":{"login":"duducp","id":16366240,"avatar_url":"https://avatars.githubusercontent.com/u/16366240?v=3","gravatar_id":"","url":"https://api.github.com/users/duducp","html_url":"https://github.com/duducp","followers_url":"https://api.github.com/users/duducp/followers","following_url":"https://api.github.com/users/duducp/following{/other_user}","gists_url":"https://api.github.com/users/duducp/gists{/gist_id}","starred_url":"https://api.github.com/users/duducp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duducp/subscriptions","organizations_url":"https://api.github.com/users/duducp/orgs","repos_url":"https://api.github.com/users/duducp/repos","events_url":"https://api.github.com/users/duducp/events{/privacy}","received_events_url":"https://api.github.com/users/duducp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-14T12:18:35Z","updated_at":"2016-06-14T14:21:53Z","closed_at":"2016-06-14T14:21:53Z","body":"Boa tarde, minha dúvida é a seguinte:\r\n\r\n`$ads = Advertising::all(array(\r\n            'select' => '*',\r\n            'conditions' => array(\r\n                'title like ?',\r\n                \"%\".$get.\"%\"\r\n            )\r\n        ));`\r\n\r\nComo vocês podem ver estou tentando dar um like na tabela utilizando %%, mas não está me retornando nenhum dado."},"comment":{"url":"https://api.github.com/repos/brunosantoshx/treinamento-php-activerecord/issues/comments/225896674","html_url":"https://github.com/brunosantoshx/treinamento-php-activerecord/issues/1#issuecomment-225896674","issue_url":"https://api.github.com/repos/brunosantoshx/treinamento-php-activerecord/issues/1","id":225896674,"user":{"login":"duducp","id":16366240,"avatar_url":"https://avatars.githubusercontent.com/u/16366240?v=3","gravatar_id":"","url":"https://api.github.com/users/duducp","html_url":"https://github.com/duducp","followers_url":"https://api.github.com/users/duducp/followers","following_url":"https://api.github.com/users/duducp/following{/other_user}","gists_url":"https://api.github.com/users/duducp/gists{/gist_id}","starred_url":"https://api.github.com/users/duducp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duducp/subscriptions","organizations_url":"https://api.github.com/users/duducp/orgs","repos_url":"https://api.github.com/users/duducp/repos","events_url":"https://api.github.com/users/duducp/events{/privacy}","received_events_url":"https://api.github.com/users/duducp/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T14:21:53Z","updated_at":"2016-06-14T14:21:53Z","body":"Na verdade basta fazer o seguinte:\r\n\r\n`$ads = Advertising::all(array(\r\n                'select' => '*',\r\n                'conditions' => array(\r\n                    'title like CONCAT(\"%\", ? ,\"%\")',\r\n                    $get\r\n            ))\r\n        );`"}}
{"actor":{"display_login":"duducp"}}