Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MYSQL]Jak pominąć ten błąd?
smietek
post
Post #1





Grupa: Zarejestrowani
Postów: 306
Pomógł: 32
Dołączył: 20.01.2008

Ostrzeżenie: (20%)
X----


Mam problem z takim zapytaniem:
  1. SELECT
  2. count(`articles_comments`.`id`) AS `art_comms`,
  3. count(`comment_news`.`id`) AS `news_comms`,
  4. count(`articles_votes`.`id`) AS `art_votes`,
  5. count(`survey_votes`.`id`) AS `surv_votes`,
  6. count(`shoutbox`.`id`) AS `shout`
  7. FROM `users`
  8. LEFT JOIN `shoutbox` ON `shoutbox`.`user_id` = `users`.`id`
  9. LEFT JOIN `survey_votes` ON `survey_votes`.`user_id` = `users`.`id`
  10. LEFT JOIN `articles_votes` ON `articles_votes`.`user_id` = `users`.`id`
  11. LEFT JOIN `comment_news` ON `comment_news`.`author_id` = `users`.`id`
  12. LEFT JOIN `articles_comments` ON `articles_comments`.`user_id` = `users`.`id`
  13. WHERE `users`.`id` = $_SESSION[id]
  14. GROUP BY `users`.`id`

Wszystko jest dobrze, dopóki nie wyświetlę wyniku.
Na localhoście (mam XAMPPa) wszystko jest dobrze wyświetlane, a na wykupionym hostingu wszystko mi się zlewa, tzn. gdy dodam jakiś wpis do shoutboxa, to wszędzie tam, gdzie wartość nie jest zerowa to zlicza mi WSZYSTKO, czyli nie tylko Shoutboxa, ale i komentarze itd...
Czy to błąd MySQL?
Na XAMMPie mam: Wersja serwera: 5.0.51b-community, Wersja klienta MySQL: 5.0.51b
Na wirtualnym: Wersja serwera: 5.0.67-percona-b6-log, Wersja klienta MySQL: 4.1.22
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 08:17