{"id":558,"date":"2013-10-17T17:41:27","date_gmt":"2013-10-17T14:41:27","guid":{"rendered":"http:\/\/www.gencnesil.org\/?p=558"},"modified":"2013-10-17T17:41:27","modified_gmt":"2013-10-17T14:41:27","slug":"mysql-hatasi-you-have-an-error-in-your-sql-syntax-cozumu","status":"publish","type":"post","link":"https:\/\/gncz.net\/index.php\/mysql-hatasi-you-have-an-error-in-your-sql-syntax-cozumu.html","title":{"rendered":"MYSQL Hatasi: You have an error in your SQL syntax &#8211; \u00e7\u00f6z\u00fcm\u00fc"},"content":{"rendered":"<p>Bu hata mysql t\u0131rnak i\u015faretli veri girmenzden dolay\u0131 kaynaklan\u0131yor veriyi girerken t\u0131rnak i\u015faretlerinin format\u0131n\u0131 degi\u015ftirerek cozume ula\u015fabilirsiniz.<\/p>\n<p>veriyi bu sekilde giriyorsan\u0131z eger;<\/p>\n<blockquote><p><code><code>mysql_query(\"UPDATE\u00a0alan\u00a0SET\u00a0name='\".$_POST['name'].\"',<br \/>\n<\/code><\/code><\/p><\/blockquote>\n<p>bu sekilde girerseniz ;<\/p>\n<blockquote><p><code><code>mysql_query(\"UPDATE\u00a0alan\u00a0SET\u00a0name='\".mysql_real_escape_string($_POST['name']).\"',<br \/>\n<\/code><\/code><\/p><\/blockquote>\n<p>Sorun ortadan kalkacalt\u0131r<\/p>\n<p>alternatif olarak<\/p>\n<p>&nbsp;<\/p>\n<blockquote><p>veri girerken : addslashes($mesaj);<\/p>\n<p>strip_tags(); ve str_replace komutlar\u0131n\u0131 ara\u015ft\u0131r\u0131p uygulayabilirsiniz.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Bu hata mysql t\u0131rnak i\u015faretli veri girmenzden dolay\u0131 kaynaklan\u0131yor veriyi girerken t\u0131rnak i\u015faretlerinin format\u0131n\u0131 degi\u015ftirerek cozume ula\u015fabilirsiniz. veriyi bu sekilde giriyorsan\u0131z eger; mysql_query(&#8220;UPDATE\u00a0alan\u00a0SET\u00a0name='&#8221;.$_POST[&#8216;name&#8217;].&#8221;&#8216;, bu sekilde girerseniz ; mysql_query(&#8220;UPDATE\u00a0alan\u00a0SET\u00a0name='&#8221;.mysql_real_escape_string($_POST[&#8216;name&#8217;]).&#8221;&#8216;, Sorun ortadan kalkacalt\u0131r alternatif olarak &nbsp; veri girerken : addslashes($mesaj); strip_tags(); ve str_replace komutlar\u0131n\u0131 ara\u015ft\u0131r\u0131p uygulayabilirsiniz.<\/p>\n","protected":false},"author":1,"featured_media":559,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/posts\/558"}],"collection":[{"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/comments?post=558"}],"version-history":[{"count":0,"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/posts\/558\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gncz.net\/index.php\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/media?parent=558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/categories?post=558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/tags?post=558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}