Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Dodawanie opornej tabelki
Advance202
post
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 28.03.2005

Ostrzeżenie: (0%)
-----


Witam,

próbuję ręcznie dodać tabelkę do skryptu SocialProfile do bazy z pominięciem linii polecen, bo się jej na serwerze nazwa.pl nie doszukałem

taki komunikat dostaję
  1. #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 'user_stats (
  2. `stats_year_id` int(2) NOT NULL DEFAULT '0',
  3. `stats_user_id` ' at line 1


tabelką, którą dodaję wygląda tak:
  1. CREATE TABLE /*$wgDBprefix*/user_stats (
  2. `stats_year_id` int(2) NOT NULL DEFAULT '0',
  3. `stats_user_id` int(11) NOT NULL DEFAULT '0',
  4. `stats_user_name` varchar(255) NOT NULL DEFAULT '',
  5. `stats_user_image_count` int(11) NOT NULL DEFAULT '0',
  6. `stats_comment_count` int(11) NOT NULL DEFAULT '0',
  7. `stats_comment_score` int(11) NOT NULL DEFAULT '0',
  8. `stats_comment_score_positive_rec` int(11) NOT NULL DEFAULT '0',
  9. `stats_comment_score_negative_rec` int(11) NOT NULL DEFAULT '0',
  10. `stats_comment_score_positive_given` int(11) NOT NULL DEFAULT '0',
  11. `stats_comment_score_negative_given` int(11) NOT NULL DEFAULT '0',
  12. `stats_comment_blocked` int(11) NOT NULL DEFAULT '0',
  13. `stats_vote_count` int(11) NOT NULL DEFAULT '0',
  14. `stats_edit_count` int(11) NOT NULL DEFAULT '0',
  15. `stats_opinions_created` int(11) NOT NULL DEFAULT '0',
  16. `stats_opinions_published` int(11) NOT NULL DEFAULT '0',
  17. `stats_referrals` int(11) NOT NULL DEFAULT '0',
  18. `stats_referrals_completed` int(11) NOT NULL DEFAULT '0',
  19. `stats_challenges_count` int(11) NOT NULL DEFAULT '0',
  20. `stats_challenges_won` int(11) NOT NULL DEFAULT '0',
  21. `stats_challenges_rating_positive` int(11) NOT NULL DEFAULT '0',
  22. `stats_challenges_rating_negative` int(11) NOT NULL DEFAULT '0',
  23. `stats_friends_count` int(11) NOT NULL DEFAULT '0',
  24. `stats_foe_count` int(11) NOT NULL DEFAULT '0',
  25. `stats_gifts_rec_count` int(11) NOT NULL DEFAULT '0',
  26. `stats_gifts_sent_count` int(11) NOT NULL DEFAULT '0',
  27. `stats_weekly_winner_count` int(11) NOT NULL DEFAULT '0',
  28. `stats_monthly_winner_count` int(11) NOT NULL DEFAULT '0',
  29. `stats_total_points` int(20) DEFAULT '0',
  30. `stats_overall_rank` int(11) NOT NULL DEFAULT '0',
  31. `up_complete` int(5) DEFAULT NULL,
  32. `user_board_count` int(5) DEFAULT '0',
  33. `user_board_sent` int(5) DEFAULT '0',
  34. `user_board_count_priv` int(5) DEFAULT '0',
  35. `stats_picturegame_votes` int(5) DEFAULT '0',
  36. `stats_picturegame_created` int(5) DEFAULT '0',
  37. `user_status_count` int(5) DEFAULT '0',
  38. `stats_poll_votes` int(5) DEFAULT '0',
  39. `user_status_agree` int(11) DEFAULT '0',
  40. `stats_quiz_questions_answered` int(11) DEFAULT '0',
  41. `stats_quiz_questions_correct` int(11) DEFAULT '0',
  42. `stats_quiz_points` int(11) DEFAULT '0',
  43. `stats_quiz_questions_created` int(11) DEFAULT '0',
  44. `stats_quiz_questions_correct_percent` float DEFAULT '0',
  45. PRIMARY KEY (`stats_user_id`)
  46. ) DEFAULT CHARSET=utf8;


juz 4 godziny siedze i nic wstydnis.gif
jest jakaś nadzieja?
jestem amatorem wstydnis.gif
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 4)
Mchl
post
Post #2





Grupa: Zarejestrowani
Postów: 855
Pomógł: 145
Dołączył: 17.07.2008
Skąd: High Memory Area

Ostrzeżenie: (0%)
-----


Kod
Query OK, 0 rows affected (0.25 sec)


Innymi słowy: u mnie działa. Komunikat błędu nie pasuje mi do braku uprawnień... O ile z tym prefixem nie pochrzaniłeś czegoś, to powinno przejść.

Ten post edytował Mchl 22.06.2010, 20:07:28
Go to the top of the page
+Quote Post
Advance202
post
Post #3





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 28.03.2005

Ostrzeżenie: (0%)
-----


inne tabelki mają ten sam prefix i w nich to przeszło. Jak to mozliwe, ze tu nie chce skoro konstrukcja tej tabelki jest niemal taka sama?

EDIT:
udało się

nie wiem dlaczego nie akceptowal nazwy

zmienilem nazwę tabeli i dodał. No wiec zmienilem jej nazwe na prawidłową i działa..aczkolwiek nie potrafię tego wytlumaczyć w żaden sposób

Ten post edytował Advance202 22.06.2010, 20:44:55
Go to the top of the page
+Quote Post
Mchl
post
Post #4





Grupa: Zarejestrowani
Postów: 855
Pomógł: 145
Dołączył: 17.07.2008
Skąd: High Memory Area

Ostrzeżenie: (0%)
-----


Jaka to wersja MySQL?
Go to the top of the page
+Quote Post
Advance202
post
Post #5





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 28.03.2005

Ostrzeżenie: (0%)
-----


MySQL: 5.0.90
phpMyAdmin - 2.10.3
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 20.08.2025 - 01:45