Author |
Topic  |
|
Hermes
Junior Member
 
Croatia
113 Posts |
Posted - 06 April 2007 : 05:47:44
|
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
|
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.  |
 |
|
Hermes
Junior Member
 
Croatia
113 Posts |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 06 April 2007 : 09:07:06
|
Your welcome. 
Good luck. |
 |
|
Hermes
Junior Member
 
Croatia
113 Posts |
Posted - 06 April 2007 : 11:08:07
|
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 |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 06 April 2007 : 11:35:39
|
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? |
 |
|
Hermes
Junior Member
 
Croatia
113 Posts |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 06 April 2007 : 14:47:24
|
Your welcome. Glad I could help.  |
 |
|
|
Topic  |
|