<?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=1423&amp;type=atom" />
	<updated>2009-10-16T20:44:14Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.php-myadmin.ru/viewtopic.php?id=1423</id>
		<entry>
			<title type="html"><![CDATA[Помогите с Аргументами]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=9433#p9433" />
			<content type="html"><![CDATA[<p>В коде имеется ошибка. Помогите найти</p><br /><p>&lt;?php <br />&nbsp; &nbsp; &nbsp; &nbsp; $result = mysql_query (&quot;SELECT * FROM news ORDER BY id DESC LIMIT 2&quot;, $db);<br />&nbsp; &nbsp; &nbsp; &nbsp; $myrow = mysql_fetch_array ($result);<br />&nbsp; &nbsp; &nbsp; &nbsp; do<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />printf (&quot;&lt;table width=&#039;100%<span style="color: red">%</span>&#039; border=&#039;0&#039; cellspacing=&#039;0&#039; cellpadding=&#039;8&#039; align=&#039;center&#039;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt; <br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;td class=&#039;a12w&#039;&gt;&lt;b&gt;&lt;font color=&#039;#E4FF00&#039;&gt;%s&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&#039;view_news.php?id=%s&#039;&gt;%s&lt;/td&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/table&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;table width=&#039;100%<span style="color: red">%</span>&#039; border=&#039;0&#039; cellspacing=&#039;0&#039; cellpadding=&#039;0&#039; align=&#039;center&#039;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt; <br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;td align=&#039;right&#039;&gt;&lt;img src=&#039;images/sp_2_0608_23.gif&#039; /&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/table&gt;&quot;, $myrow [&quot;id&quot;], $myrow [&quot;date&quot;], $myrow [&quot;description&quot;]);<br /> }<br />&nbsp; &nbsp; &nbsp; &nbsp; while ($myrow = mysql_fetch_array ($result));</p><p>В браузере выходит ошибка <br />Warning: printf() [function.printf]: Too few arguments in <br />строка &lt;/table&gt;&quot;, $myrow [&quot;id&quot;], $myrow [&quot;date&quot;], $myrow [&quot;description&quot;]);</p><p><span style="color: red">Обратите внимание на знак процента, который является групповым символом используемым в функции printf(), чтобы использовать его как литературный символ, необходимо использовать экранирование, двойной знак процента.</span></p>]]></content>
			<author>
				<name><![CDATA[RUB]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=2272</uri>
			</author>
			<updated>2009-10-16T20:44:14Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=9433#p9433</id>
		</entry>
</feed>
