Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Active Users MySql table write problem
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Hermes
Junior Member

Croatia
113 Posts

Posted - 06 April 2007 :  05:47:44  Show Profile
Snitz 3.4.06

On my test forum I implemented Active Users Mod 4.0
When I run dbs_activeusers from Admin panel, writing tables successful, but in the middle I get this error:

-2147217900 | [MySQL][ODBC 3.51 Driver][mysqld-4.0.18-nt-log]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 'varchar(1) NULL' at line 1

So test forum mysql is 4.0. But I continue with mod implementation in files, and everything seems to working ok, now when I finished changes in files and test it.

I would like to hear your opinion before installation of mod in my live forum.
My live forum mysql is 5.0

dbs_activeusers.txt >>

best regards


ASP Snitz Forum Upute za instalaciju
http://www.kairos.com.hr http://www.hermetizam.com Forum

not so newbie any more :)

Edited by - Hermes on 07 April 2007 03:45:39

AnonJr
Moderator

United States
5768 Posts

Posted - 06 April 2007 :  07:02:43  Show Profile  Visit AnonJr's Homepage
I seem to remember seeing this come up before... have you searched for that particular error code? If memory serves, it has something to do with the admin page that handles translating the DBS script to a MySQL-friendly SQL statement. But then again, I haven't had my coffee yet, so don't take that as the final word.
Go to Top of Page

Hermes
Junior Member

Croatia
113 Posts

Posted - 06 April 2007 :  08:24:07  Show Profile

Yes I find it:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=60804

thanks for advice

now I'm going to check it all out



ASP Snitz Forum Upute za instalaciju
http://www.kairos.com.hr http://www.hermetizam.com Forum

not so newbie any more :)
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 06 April 2007 :  09:07:06  Show Profile  Visit AnonJr's Homepage
Your welcome.

Good luck.
Go to Top of Page

Hermes
Junior Member

Croatia
113 Posts

Posted - 06 April 2007 :  11:08:07  Show Profile
quote:
Originally posted by masterao


[ALTER]
MEMBERS
ADD#M_AUHIDE#varchar(1)#NULL#
ALTER#M_AUHIDE#varchar(1)#NULL#
[END]

The two lines aren't the same. The first line adds M_AUHIDE while the second line alters M_AUHIDE. If M_AUHIDE already exists, the first line (ADD) will throw an error and the second line (ALTER) will run. If M_AUHIDE doesn't exist, the first line will work while the second will throw an error. The reason for the alter command is to reset M_AUHIDE to the default value, as cripto9t said.



Hm. Lets see if I understand it right.

If I already have M_AUHIDE column in my MEMBERS table, then I add ALTER#M_AUHIDE#varchar(1)#NULL# in dbs file, and if I do not have M_AUHIDE column in MEMBERS table (which is the case in my live database version) then I just run Mod update without change anything in dbs_activeusers.asp code?

????



ASP Snitz Forum Upute za instalaciju
http://www.kairos.com.hr http://www.hermetizam.com Forum

not so newbie any more :)

Edited by - Hermes on 07 April 2007 03:44:53
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 06 April 2007 :  11:35:39  Show Profile  Visit AnonJr's Homepage
You paste the entire part. It will take care of one of two things, depending on what the situation is.

1. If the column doesn't exist, it will add it. If this is the case, in the final results it will give you an error on the second line - which is OK.

2. If the column does exist, it will modify it as needed. If this is the case, in the final results it will give you an error on the first line - which is OK.

Does this help clarify?
Go to Top of Page

Hermes
Junior Member

Croatia
113 Posts

Posted - 06 April 2007 :  14:40:40  Show Profile

Yes it seems that I understand now.
Error is nothing to worry about, as long all columns are in the right place in mysql table.

I implemented it now on live forum, everything seems to work properly.

Thanks very much for your time AnonJr



ASP Snitz Forum Upute za instalaciju
http://www.kairos.com.hr http://www.hermetizam.com Forum

not so newbie any more :)
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 06 April 2007 :  14:47:24  Show Profile  Visit AnonJr's Homepage
Your welcome. Glad I could help.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.4 seconds. Powered By: Snitz Forums 2000 Version 3.4.07