не работает счётчик - Visavi.net https://visavi.net/ RSS - Visavi.net https://visavi.net/assets/img/images/logo_small.png RSS - Visavi.net https://visavi.net/ [email protected] (admin) [email protected] (admin) Mon, 13 Jan 2025 06:02:02 +0300 Обнови код где не работает<br> <pre class="prettyprint"> if ($status&#91;&#039;id&#039;]) { echo&#039;&lt;a href=&quot;../pages/komm.php?id=&#039; . $status&#91;&#039;id&#039;] . &#039;&quot;&gt;&lt;img class=&quot;ico&quot; src=&quot;../style/&#039;.$style.&#039;/ico/comments.png&quot; alt=&quot;&quot; /&gt; (&#039; . $num_komm . &#039;)&lt;/a&gt; &#039;; } </pre> https://visavi.net/topics/21265/357345 не работает счётчик ZipeR Thu, 05 May 2011 14:24:47 +0400 Сообщения https://visavi.net/topics/21265/357345 а вот этом коде работает всё, можете сверить код, посмотрите в чём причина, почему в 1 коде не работает.<br> <pre class="prettyprint"> $status = mysql_fetch_assoc(mysql_query(&quot;SELECT * FROM `users` WHERE `id` = &#039;&quot; . $id . &quot;&#039;&quot;)); echo &#039;&lt;div class=&quot;where&quot;&gt;Все статусы &#039; . $status&#91;&#039;login&#039;] . &#039;&lt;/div&gt;&#039;; $r = mysql_query(&quot;SELECT * FROM `statuses` WHERE `type` = &#039;status&#039; AND `user` = &#039;&quot; . $status&#91;&#039;id&#039;] . &quot;&#039; ORDER by `time` DESC LIMIT &quot; . $page . &quot;,&quot; . $set&#91;&#039;str&#039;] . &quot;&quot;); $total = mysql_result(mysql_query(&quot;SELECT COUNT(*) FROM `statuses` WHERE `type` = &#039;status&#039; AND `user` = &#039;&quot; . $status&#91;&#039;id&#039;] . &quot;&#039;&quot;), 0); if ($total == 0) echo &#039;Статусов еще нет!&#039;; while ($e = mysql_fetch_assoc($r)) { $num_komm = mysql_result(mysql_query(&quot;SELECT COUNT(*) FROM `statuses` WHERE `refid` = &#039;&quot; . $e&#91;&#039;id&#039;] . &quot;&#039; AND `type` = &#039;komm&#039;&quot;), 0); echo ($i % 2) ? &#039;&lt;div class=&quot;forum1&quot;&gt;&#039; &#58; &#039;&lt;div class=&quot;forum2&quot;&gt;&#039;; echo &#039;&lt;div class=&quot;status&quot;&gt;&lt;b&gt;&lt;!-- clear --&gt;&lt;/b&gt; &#039; . $e&#91;&#039;text&#039;] . &#039; (&#039; . date(&quot;d.m.Y G&#58;i&quot;, $e&#91;&#039;time&#039;]) . &#039;)&lt;/div&gt; &lt;a href=&quot;komm.php?id=&#039; . $e&#91;&#039;id&#039;] . &#039;&quot;&gt;&lt;img class=&quot;ico&quot; src=&quot;../style/&#039;.$style.&#039;/ico/comments.png&quot; alt=&quot;&quot; /&gt; &#039; . $num_komm . &#039;&lt;/a&gt;&#039;; if ($e&#91;&#039;user&#039;] == $user&#91;&#039;id&#039;]) echo &#039; &lt;a href=&quot;?act=del&amp;amp;id=&#039; . $e&#91;&#039;id&#039;] . &#039;&quot;&gt;&lt;img align=&quot;right&quot; class=&quot;ico&quot; src=&quot;../style/&#039;.$style.&#039;/ico/bdel.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&#039;; echo &#039;&lt;/div&gt;&#039;; $i++; } </pre> <br> <em><span style="font-size:x-small">Добавлено через 04:17 сек.</span></em><br> а именно в 1 коде вот это не работает <br> <pre class="prettyprint"> if ($status&#91;&#039;id&#039;]) echo&#039;&lt;a href=&quot;../pages/komm.php?id=&#039; . $status&#91;&#039;id&#039;] . &#039;&quot;&gt;&lt;img class=&quot;ico&quot; src=&quot;../style/&#039;.$style.&#039;/ico/comments.png&quot; alt=&quot;&quot; /&gt; (&#039; . $num_komm . &#039;)&lt;/a&gt; &#039;; </pre> https://visavi.net/topics/21265/357261 не работает счётчик Don Thu, 05 May 2011 09:30:29 +0400 Сообщения https://visavi.net/topics/21265/357261 <pre class="prettyprint"> $status = mysql_fetch_assoc(mysql_query(&quot;SELECT * FROM `statuses` WHERE `user` = &#039;&quot; . $query&#91;&#039;id&#039;] . &quot;&#039; AND `type` = &#039;status&#039; ORDER by `time` DESC LIMIT 1&quot;)); echo &#039;&lt;div class=&quot;where&quot;&gt; &#039;; if ($status&#91;&#039;text&#039;]) echo&#039;&lt;div class=&quot;status&quot;&gt;&lt;b&gt;&lt;!-- clear --&gt;&lt;/b&gt; &#039;.text($status&#91;&#039;text&#039;]) . &#039;&lt;/div&gt;&#039;; if($user&#91;&#039;id&#039;] == $query&#91;&#039;id&#039;]) echo&#039; &lt;a href=&quot;../pages/greeting.php&quot;&gt;Изм.&lt;/a&gt; &#039;; $num_status = mysql_result(mysql_query(&quot;SELECT COUNT(*) FROM `statuses` WHERE `user` = &#039;&quot; . $query&#91;&#039;id&#039;] . &quot;&#039; AND `type` = &#039;status&#039;&quot;), 0); $num_komm = 0; $r = mysql_query(&quot;SELECT * FROM `statuses` WHERE `refid` = &#039;&quot; . $query&#91;&#039;id&#039;] . &quot;&#039; AND `type` = &#039;status&#039;&quot;); while ($e = mysql_fetch_assoc($r)) { $num_k = mysql_result(mysql_query(&quot;SELECT COUNT(*) FROM `statuses` WHERE `refid` = &#039;&quot; . $e&#91;&#039;id&#039;] . &quot;&#039; AND `type` = &#039;komm&#039;&quot;), 0); $num_komm = $num_komm + $num_k; } if ($status&#91;&#039;id&#039;]) echo&#039;&lt;a href=&quot;../pages/komm.php?id=&#039; . $status&#91;&#039;id&#039;] . &#039;&quot;&gt;&lt;img class=&quot;ico&quot; src=&quot;../style/&#039;.$style.&#039;/ico/comments.png&quot; alt=&quot;&quot; /&gt; (&#039; . $num_komm . &#039;)&lt;/a&gt; &#039;; </pre> вот код почему то счётчик не пашит на комментарии статуса, хотя там есть комментарии https://visavi.net/topics/21265/357259 не работает счётчик Don Thu, 05 May 2011 09:27:08 +0400 Сообщения https://visavi.net/topics/21265/357259