three calendar posts

Started by sight|i|picture, April 26, 2004, 02:53:54 PM

Previous topic - Next topic

sight|i|picture

I have a slight problem with my calendar.

http://www.lanpartynw.com/forumse/index.php?action=calendar;year=2004;month=5

It seems that I have three posts for each holiday. eg.  Mother's Day, Mother's Day, Mother's Day and

Any quick way to fix this?

sightpicture

[Unknown]

I think the easiest way is to recreate the calendar_holidays table from the one in smf_1-0.sql with phpMyAdmin.... if you haven't gotten any posts yet it might be worth just reinstalling.

For what it's worth, I think I may have made it so the new installer will not do this. (although this is caused by getting errors in the installation in the first place....)

-[Unknown]

sight|i|picture

I converted from YabbSE to SMF, but then our hosting company uptime went down hill so I left them for a new host. I went from a Windows server to a linux server.

I installed SMF from scratch then imported my YabbSE/SMF database over.

I think this is where the problems started off at. It is begining to look good and my board members are very happy with the speed of the forums etc. So, all in all I think it was a good move.

It's just that I have all these little errors... 3 sets of smileys, 3 sets of calendar messages (not birthdays thou) anyway, thanks for the help!  I will use PHPmyadmin tonight and recreate the smf_1-0.spl  :)
sightpicture

[Unknown]

Well, the .sql file is a text file with commands you can paste in the SQL tab of phpMyAdmin.

I think you will want to EMPTY the smileys and calendar_holidays tables... and then use the INSERT INTO ... statements for those tables.  Remember to take off the {$db_prefix} part and replace it with your prefix!

-[Unknown]

sight|i|picture

I started with the calendar_holidays table, I emptied it and now I can figure out the insert part:

INSERT INTO {$db_lanpartynw}calendar_holidays
(title, eventDate)
VALUES ('New Years', '0000-01-01'),
('Christmas', '0000-12-25'),
('Valentine\'s Day', '0000-02-14'),
('St. Patrick\'s Day', '0000-03-17'),
('April Fools', '0000-04-01'),
('Earth Day', '0000-04-22'),
('United Nations Day', '0000-10-24'),
('Halloween', '0000-10-31'),
('Mother\'s Day', '2002-05-12'),
('Mother\'s Day', '2003-05-11'),
('Mother\'s Day', '2004-05-09'),
('Mother\'s Day', '2005-05-08'),
('Mother\'s Day', '2006-05-14'),
('Mother\'s Day', '2007-05-13'),
('Mother\'s Day', '2008-05-11'),
('Mother\'s Day', '2009-05-10'),
('Mother\'s Day', '2010-05-09'),
('Father\'s Day', '2002-06-16'),
('Father\'s Day', '2003-06-15'),
('Father\'s Day', '2004-06-20'),
('Father\'s Day', '2005-06-19'),
('Father\'s Day', '2006-06-18'),
('Father\'s Day', '2007-06-17'),
('Father\'s Day', '2008-06-15'),
('Father\'s Day', '2009-06-21'),
('Father\'s Day', '2010-06-20'),
('Summer Solstice', '2002-06-21'),
('Summer Solstice', '2003-06-21'),
('Summer Solstice', '2004-06-20'),
('Summer Solstice', '2005-06-20'),
('Summer Solstice', '2006-06-21'),
('Summer Solstice', '2007-06-21'),
('Summer Solstice', '2008-06-20'),
('Summer Solstice', '2009-06-20'),
('Summer Solstice', '2010-06-21'),
('Vernal Equinox', '2002-03-20'),
('Vernal Equinox', '2003-03-20'),
('Vernal Equinox', '2004-03-19'),
('Vernal Equinox', '2005-03-20'),
('Vernal Equinox', '2006-03-20'),
('Vernal Equinox', '2007-03-20'),
('Vernal Equinox', '2008-03-19'),
('Vernal Equinox', '2009-03-20'),
('Vernal Equinox', '2010-03-20'),
('Winter Solstice', '2002-12-21'),
('Winter Solstice', '2003-12-22'),
('Winter Solstice', '2004-12-21'),
('Winter Solstice', '2005-12-21'),
('Winter Solstice', '2006-12-22'),
('Winter Solstice', '2007-12-22'),
('Winter Solstice', '2008-12-21'),
('Winter Solstice', '2009-12-21'),
('Winter Solstice', '2010-12-21'),
('Autumnal Equinox', '2002-09-22'),
('Autumnal Equinox', '2003-09-23'),
('Autumnal Equinox', '2004-09-22'),
('Autumnal Equinox', '2005-09-22'),
('Autumnal Equinox', '2006-09-22'),
('Autumnal Equinox', '2007-09-23'),
('Autumnal Equinox', '2008-09-22'),
('Autumnal Equinox', '2009-09-22'),
('Autumnal Equinox', '2010-09-22');

INSERT INTO {$db_prefix}calendar_holidays
(title, eventDate)
VALUES ('Independence Day', '0000-07-04'),
('Cinco de Mayo', '0000-05-05'),
('Flag Day', '0000-06-14'),
('Veterans Day', '0000-11-11'),
('Groundhog Day', '0000-02-02'),
('Thanksgiving', '2002-11-28'),
('Thanksgiving', '2003-11-27'),
('Thanksgiving', '2004-11-25'),
('Thanksgiving', '2005-11-24'),
('Thanksgiving', '2006-11-23'),
('Thanksgiving', '2007-11-22'),
('Thanksgiving', '2008-11-27'),
('Thanksgiving', '2009-11-26'),
('Thanksgiving', '2010-11-25'),
('Memorial Day', '2002-05-27'),
('Memorial Day', '2003-05-26'),
('Memorial Day', '2004-05-31'),
('Memorial Day', '2005-05-30'),
('Memorial Day', '2006-05-29'),
('Memorial Day', '2007-05-28'),
('Memorial Day', '2008-05-26'),
('Memorial Day', '2009-05-25'),
('Memorial Day', '2010-05-31'),
('Labor Day', '2002-09-02'),
('Labor Day', '2003-09-01'),
('Labor Day', '2004-09-06'),
('Labor Day', '2005-09-05'),
('Labor Day', '2006-09-04'),
('Labor Day', '2007-09-03'),
('Labor Day', '2008-09-01'),
('Labor Day', '2009-09-07'),
('Labor Day', '2010-09-06');


My database is called lanpartynw and the table prefix is yabbse_ , when I click on Insert I get Field, Type, Function, Null, and Value options.

I don't see where I can insert this above code. Plus, I'm not sure if the {$db_prefix} is {$db_yabbse} or {$db_lanpartynw}

I'm a little lost. Once I get the calendar holiday fixed I will move onto the smileys. ;-)
sightpicture

[Unknown]

Change {$db_prefix} to yabbse_ so it reads "INSERT INTO yabbse_calendar_holidays".  There are two of them, mind you.

-[Unknown]

sight|i|picture

#6
ok, I've changed both of them to {$db_yabbse}

Now, how to I Insert all that code at one time using phpMyAdmin and the single row Insert screen?

edit: found the link to upload or insert from file, but it seems I don't have the rights:

Database lanpartynw - Table yabbse_calendar_holidays running on localhost
Error

SQL-query : 

LOAD DATA INFILE '/tmp/phpI2pTZF' INTO TABLE `yabbse_calendar_holidays` FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'

MySQL said:


#1045 - Access denied for user: 'lanparty@localhost' (Using password: YES)
sightpicture

[Unknown]

Send that to your host...

-[Unknown]

Advertisement: