<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум PHP-MyAdmin.RU &mdash; Нужна помощь с кодировкой.]]></title>
	<link rel="self" href="https://forum.php-myadmin.ru/extern.php?action=feed&amp;tid=1628&amp;type=atom" />
	<updated>2010-03-21T13:51:02Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.php-myadmin.ru/viewtopic.php?id=1628</id>
		<entry>
			<title type="html"><![CDATA[Re: Нужна помощь с кодировкой.]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=11245#p11245" />
			<content type="html"><![CDATA[<p><strong>sssvladimir</strong><br />Видно, что LIMIT не задан. Попробуйте вручную составить запрос вида:<br /></p><div class="codebox"><pre><code>SELECT *
FROM `banners`
LIMIT 0,10</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Hanut]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=181</uri>
			</author>
			<updated>2010-03-21T13:51:02Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=11245#p11245</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Нужна помощь с кодировкой.]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=11244#p11244" />
			<content type="html"><![CDATA[<p>на новом хостинге, возникла другая проблема<br />phpmyadmin при просмотре любой таблицы выдаёт ошибку <br />#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#039;&#039; at line 2<br />___________________<br />SELECT *<br />FROM `banners`<br />LIMIT , <br />___________________<br />Только вот этот текст меняется в зависимости от таблиц</p><p>как это исправить?<br />кодировка базы и таблиц utf8</p>]]></content>
			<author>
				<name><![CDATA[sssvladimir]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=2653</uri>
			</author>
			<updated>2010-03-21T13:42:27Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=11244#p11244</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Нужна помощь с кодировкой.]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=11243#p11243" />
			<content type="html"><![CDATA[<p>Прокомментировал код.</p><p>Если вы меняли кодировки таблиц туда-сюда, когда в них были данные, то попробуйте их пересоздать заново.</p>]]></content>
			<author>
				<name><![CDATA[Hanut]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=181</uri>
			</author>
			<updated>2010-03-20T20:37:49Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=11243#p11243</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Нужна помощь с кодировкой.]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=11241#p11241" />
			<content type="html"><![CDATA[<p>Буду благодарен за любую помощь, сам начал заниматься сайтостроительством недавно, поэтому не знаю в чём может быть проблема.<br />Постараюсь предоставить максимум информации:<br />БД создана в UTF-8</p><p>Таблицы созданы с использованием ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;</p><p>Сопоставление соединения с MySQL: utf8_general_ci</p><p>character_set_client&nbsp; &nbsp; utf8<br />character_set_connection&nbsp; &nbsp; utf8<br />character_set_database&nbsp; &nbsp; utf8<br />character_set_filesystem&nbsp; &nbsp; binary<br />character_set_results&nbsp; &nbsp; utf8<br />character_set_server&nbsp; &nbsp; cp1251<br />character_set_system&nbsp; &nbsp; utf8</p><p>PHP скрипт:<br />$includes[content]=&quot;<br />&quot;.iif($error_msg,&quot;&lt;script&gt;alert(&#039;$error_msg&#039;);&lt;/script&gt;&quot;).&quot;<br />&lt;div align=\&quot;center\&quot;&gt;<br />&lt;form action=\&quot;index.php?view=account&amp;ac=new_fad&amp;action=add&amp;&quot;.$url_variables.&quot;\&quot; method=\&quot;post\&quot; onSubmit=\&quot;submitonce(this)\&quot;&gt;<br />&lt;table&gt;<br />&nbsp; &nbsp; &lt;tr&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;Title: &lt;/td&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;input type=\&quot;text\&quot; name=\&quot;title\&quot; value=\&quot;$title\&quot;&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp; &lt;tr&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;Target Url: &lt;/td&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;input type=\&quot;text\&quot; name=\&quot;target\&quot; value=\&quot;$target\&quot;&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp; &lt;tr&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;Description: &lt;/td&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;&lt;textarea name=\&quot;fad\&quot;&gt;$fad&lt;/textarea&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp; &lt;tr&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;td colspan=2 align=\&quot;center\&quot;&gt;&lt;input type=\&quot;submit\&quot; value=\&quot;Add Featured Ad\&quot;&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;<br />&lt;/table&gt;<br />&lt;/div&gt;<br />Он вводит данные в БД, причём вот в чём парадокс: title нормально сохраняется на русском, а вот&nbsp; Description кракозябрами...<br />Если в ручную через phpmyadmin переписать кракозябры на русский, то он нормально отображается.</p><p>Соединение с БД:<br />&nbsp; function connect($thehost, $thedb, $theuser, $thepwd) {<br />&nbsp; &nbsp; &nbsp; $this-&gt;Host=$thehost;<br />&nbsp; &nbsp; $this-&gt;Database=$thedb;<br />&nbsp; &nbsp; $this-&gt;User=$theuser;<br />&nbsp; &nbsp; $this-&gt;Password=$thepwd;</p><p>&nbsp; &nbsp; if ( 0 == $this-&gt;Link_ID ) {<br />&nbsp; &nbsp; &nbsp; $this-&gt;Link_ID=mysql_connect($this-&gt;Host, $this-&gt;User, $this-&gt;Password);<br />&nbsp; &nbsp; &nbsp; if (!$this-&gt;Link_ID) {<br />&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;halt(&quot;Link-ID == false, connect failed&quot;);<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; if (!mysql_query(sprintf(&quot;use %s&quot;,$this-&gt;Database),$this-&gt;Link_ID)) {<br />&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;halt(&quot;cannot use database &quot;.$this-&gt;Database);<br />&nbsp; &nbsp; &nbsp; }<br /><span style="color: #808080">//&nbsp; &nbsp; &nbsp;if (!mysql_query(&quot;SET NAMES UTF8&quot;); // В данной строке ошибка, попробуйте ту, что указана ниже.</span><br /><span style="color: red">mysql_query(&quot;SET NAMES UTF8&quot;, $this-&gt;Link_ID);</span><br />&nbsp; &nbsp; }<br />&nbsp; }</p><br /><p>Я уже в отчаинии! Доступа к настройкам сервера нет.</p>]]></content>
			<author>
				<name><![CDATA[sssvladimir]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=2653</uri>
			</author>
			<updated>2010-03-20T20:09:35Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=11241#p11241</id>
		</entry>
</feed>
