{"action":"created","comment":{"url":"https://api.github.com/repos/anderipartek/MobileBlog/pulls/comments/29570741","id":29570741,"diff_hunk":"@@ -1,34 +1,45 @@\n <?php\r\n-\r\n-\t//require_once '../../core/DataBase.php';\r\n-\t\r\n \t\r\n-    // error_reporting(E_ALL ^ E_DEPRECATED);\r\n-    \r\n-\t//detalle:    SELECT id,fecha, titulo FROM articulo where id=1\r\n+\trequire_once '../../core/Database.php';\r\n+\r\n+     error_reporting(E_ALL ^ E_DEPRECATED);\r\n+\r\n+\t//detalle:    SELECT id, fecha, titulo FROM articulo where id=1\r\n \t//eliminar:   DELETE FROM `articulo` WHERE `id`=1\r\n \t//insertar:   INSERT INTO `articulo`( `titulo`) VALUES (\"SSSSSSSS\")\r\n \t//modificar:  UPDATE `articulo` SET `titulo`=[\"el que quiera\"] WHERE id=1\r\n \r\n-\tfunction insertarArticulo($titulo, $id_usuario=1){\r\n+\tfunction insertarCategoria($titulo){\r\n+\t\t$cn = mysql_connect('localhost', 'root', '');\r\n+\t\tmysql_select_db('mb15', $cn);\r\n \t\t\r\n-\t\t$db = new Database();\r\n-\t\t$db->connect();\r\n-\t\t$db->insert('articulo', array('titulo'=>$titulo , 'id_usuario'=>$id_usuario));\t\t\r\n-\t\t$db->disconnect();\r\n+\t\t$sql = 'INSERT INTO `categoria`(`titulo`) VALUES (\"'.$titulo.'\")';\r\n+\t\t//echo (\"sql \" . $sql);\r\n+\t\tif ( !mysql_query( $sql, $cn) )\r","path":"backoffice/categoria/modelo.php","position":29,"original_position":29,"commit_id":"d3cf60b5fea79bf5f6e53d51804cd60e722ab29a","original_commit_id":"d3cf60b5fea79bf5f6e53d51804cd60e722ab29a","user":{"login":"anderipartek","id":11519980,"avatar_url":"https://avatars.githubusercontent.com/u/11519980?v=3","gravatar_id":"","url":"https://api.github.com/users/anderipartek","html_url":"https://github.com/anderipartek","followers_url":"https://api.github.com/users/anderipartek/followers","following_url":"https://api.github.com/users/anderipartek/following{/other_user}","gists_url":"https://api.github.com/users/anderipartek/gists{/gist_id}","starred_url":"https://api.github.com/users/anderipartek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anderipartek/subscriptions","organizations_url":"https://api.github.com/users/anderipartek/orgs","repos_url":"https://api.github.com/users/anderipartek/repos","events_url":"https://api.github.com/users/anderipartek/events{/privacy}","received_events_url":"https://api.github.com/users/anderipartek/received_events","type":"User","site_admin":false},"body":"Aupa Ivan\r\nNo me cuadra que hayas quitado la Clase Database, y hayas realizado las operaciones con \"mysql_connect\" luego lo miramos","created_at":"2015-05-04T08:05:08Z","updated_at":"2015-05-04T08:05:08Z","html_url":"https://github.com/anderipartek/MobileBlog/pull/2#discussion_r29570741","pull_request_url":"https://api.github.com/repos/anderipartek/MobileBlog/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/anderipartek/MobileBlog/pulls/comments/29570741"},"html":{"href":"https://github.com/anderipartek/MobileBlog/pull/2#discussion_r29570741"},"pull_request":{"href":"https://api.github.com/repos/anderipartek/MobileBlog/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/anderipartek/MobileBlog/pulls/2","id":33762010,"html_url":"https://github.com/anderipartek/MobileBlog/pull/2","diff_url":"https://github.com/anderipartek/MobileBlog/pull/2.diff","patch_url":"https://github.com/anderipartek/MobileBlog/pull/2.patch","issue_url":"https://api.github.com/repos/anderipartek/MobileBlog/issues/2","number":2,"state":"open","locked":false,"title":"Categorias","user":{"login":"ivaalfo","id":11979484,"avatar_url":"https://avatars.githubusercontent.com/u/11979484?v=3","gravatar_id":"","url":"https://api.github.com/users/ivaalfo","html_url":"https://github.com/ivaalfo","followers_url":"https://api.github.com/users/ivaalfo/followers","following_url":"https://api.github.com/users/ivaalfo/following{/other_user}","gists_url":"https://api.github.com/users/ivaalfo/gists{/gist_id}","starred_url":"https://api.github.com/users/ivaalfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivaalfo/subscriptions","organizations_url":"https://api.github.com/users/ivaalfo/orgs","repos_url":"https://api.github.com/users/ivaalfo/repos","events_url":"https://api.github.com/users/ivaalfo/events{/privacy}","received_events_url":"https://api.github.com/users/ivaalfo/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-21T13:42:31Z","updated_at":"2015-05-04T08:05:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/anderipartek/MobileBlog/pulls/2/commits","review_comments_url":"https://api.github.com/repos/anderipartek/MobileBlog/pulls/2/comments","review_comment_url":"https://api.github.com/repos/anderipartek/MobileBlog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/anderipartek/MobileBlog/issues/2/comments","statuses_url":"https://api.github.com/repos/anderipartek/MobileBlog/statuses/d3cf60b5fea79bf5f6e53d51804cd60e722ab29a","head":{"label":"ivaalfo:master","ref":"master","sha":"d3cf60b5fea79bf5f6e53d51804cd60e722ab29a","user":{"login":"ivaalfo","id":11979484,"avatar_url":"https://avatars.githubusercontent.com/u/11979484?v=3","gravatar_id":"","url":"https://api.github.com/users/ivaalfo","html_url":"https://github.com/ivaalfo","followers_url":"https://api.github.com/users/ivaalfo/followers","following_url":"https://api.github.com/users/ivaalfo/following{/other_user}","gists_url":"https://api.github.com/users/ivaalfo/gists{/gist_id}","starred_url":"https://api.github.com/users/ivaalfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivaalfo/subscriptions","organizations_url":"https://api.github.com/users/ivaalfo/orgs","repos_url":"https://api.github.com/users/ivaalfo/repos","events_url":"https://api.github.com/users/ivaalfo/events{/privacy}","received_events_url":"https://api.github.com/users/ivaalfo/received_events","type":"User","site_admin":false},"repo":null},"base":{"label":"anderipartek:master","ref":"master","sha":"ed1b433d64cde8348fd58f70c474083ac08ce058","user":{"login":"anderipartek","id":11519980,"avatar_url":"https://avatars.githubusercontent.com/u/11519980?v=3","gravatar_id":"","url":"https://api.github.com/users/anderipartek","html_url":"https://github.com/anderipartek","followers_url":"https://api.github.com/users/anderipartek/followers","following_url":"https://api.github.com/users/anderipartek/following{/other_user}","gists_url":"https://api.github.com/users/anderipartek/gists{/gist_id}","starred_url":"https://api.github.com/users/anderipartek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anderipartek/subscriptions","organizations_url":"https://api.github.com/users/anderipartek/orgs","repos_url":"https://api.github.com/users/anderipartek/repos","events_url":"https://api.github.com/users/anderipartek/events{/privacy}","received_events_url":"https://api.github.com/users/anderipartek/received_events","type":"User","site_admin":false},"repo":{"id":32726427,"name":"MobileBlog","full_name":"anderipartek/MobileBlog","owner":{"login":"anderipartek","id":11519980,"avatar_url":"https://avatars.githubusercontent.com/u/11519980?v=3","gravatar_id":"","url":"https://api.github.com/users/anderipartek","html_url":"https://github.com/anderipartek","followers_url":"https://api.github.com/users/anderipartek/followers","following_url":"https://api.github.com/users/anderipartek/following{/other_user}","gists_url":"https://api.github.com/users/anderipartek/gists{/gist_id}","starred_url":"https://api.github.com/users/anderipartek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anderipartek/subscriptions","organizations_url":"https://api.github.com/users/anderipartek/orgs","repos_url":"https://api.github.com/users/anderipartek/repos","events_url":"https://api.github.com/users/anderipartek/events{/privacy}","received_events_url":"https://api.github.com/users/anderipartek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anderipartek/MobileBlog","description":"","fork":false,"url":"https://api.github.com/repos/anderipartek/MobileBlog","forks_url":"https://api.github.com/repos/anderipartek/MobileBlog/forks","keys_url":"https://api.github.com/repos/anderipartek/MobileBlog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anderipartek/MobileBlog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anderipartek/MobileBlog/teams","hooks_url":"https://api.github.com/repos/anderipartek/MobileBlog/hooks","issue_events_url":"https://api.github.com/repos/anderipartek/MobileBlog/issues/events{/number}","events_url":"https://api.github.com/repos/anderipartek/MobileBlog/events","assignees_url":"https://api.github.com/repos/anderipartek/MobileBlog/assignees{/user}","branches_url":"https://api.github.com/repos/anderipartek/MobileBlog/branches{/branch}","tags_url":"https://api.github.com/repos/anderipartek/MobileBlog/tags","blobs_url":"https://api.github.com/repos/anderipartek/MobileBlog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anderipartek/MobileBlog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anderipartek/MobileBlog/git/refs{/sha}","trees_url":"https://api.github.com/repos/anderipartek/MobileBlog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anderipartek/MobileBlog/statuses/{sha}","languages_url":"https://api.github.com/repos/anderipartek/MobileBlog/languages","stargazers_url":"https://api.github.com/repos/anderipartek/MobileBlog/stargazers","contributors_url":"https://api.github.com/repos/anderipartek/MobileBlog/contributors","subscribers_url":"https://api.github.com/repos/anderipartek/MobileBlog/subscribers","subscription_url":"https://api.github.com/repos/anderipartek/MobileBlog/subscription","commits_url":"https://api.github.com/repos/anderipartek/MobileBlog/commits{/sha}","git_commits_url":"https://api.github.com/repos/anderipartek/MobileBlog/git/commits{/sha}","comments_url":"https://api.github.com/repos/anderipartek/MobileBlog/comments{/number}","issue_comment_url":"https://api.github.com/repos/anderipartek/MobileBlog/issues/comments{/number}","contents_url":"https://api.github.com/repos/anderipartek/MobileBlog/contents/{+path}","compare_url":"https://api.github.com/repos/anderipartek/MobileBlog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anderipartek/MobileBlog/merges","archive_url":"https://api.github.com/repos/anderipartek/MobileBlog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anderipartek/MobileBlog/downloads","issues_url":"https://api.github.com/repos/anderipartek/MobileBlog/issues{/number}","pulls_url":"https://api.github.com/repos/anderipartek/MobileBlog/pulls{/number}","milestones_url":"https://api.github.com/repos/anderipartek/MobileBlog/milestones{/number}","notifications_url":"https://api.github.com/repos/anderipartek/MobileBlog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anderipartek/MobileBlog/labels{/name}","releases_url":"https://api.github.com/repos/anderipartek/MobileBlog/releases{/id}","created_at":"2015-03-23T10:51:22Z","updated_at":"2015-05-04T07:23:01Z","pushed_at":"2015-05-04T07:23:01Z","git_url":"git://github.com/anderipartek/MobileBlog.git","ssh_url":"git@github.com:anderipartek/MobileBlog.git","clone_url":"https://github.com/anderipartek/MobileBlog.git","svn_url":"https://github.com/anderipartek/MobileBlog","homepage":null,"size":3861,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":3,"forks":9,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/anderipartek/MobileBlog/pulls/2"},"html":{"href":"https://github.com/anderipartek/MobileBlog/pull/2"},"issue":{"href":"https://api.github.com/repos/anderipartek/MobileBlog/issues/2"},"comments":{"href":"https://api.github.com/repos/anderipartek/MobileBlog/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/anderipartek/MobileBlog/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/anderipartek/MobileBlog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/anderipartek/MobileBlog/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/anderipartek/MobileBlog/statuses/d3cf60b5fea79bf5f6e53d51804cd60e722ab29a"}}}}