Author |
Topic |
|
choppermc
New Member
Australia
80 Posts |
Posted - 13 October 2003 : 03:52:41
|
Hi all Has anyone been able to get Links Manager or Davids Portal Mod to work properly with MySQL? I have just recently converted my Snitz 3.4.03 Access database to MySQL, every thing seems fine except the two mods mentioned above.
I get this error with links.asp-
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [MySQL][ODBC 3.51 Driver][mysqld-4.0.14-nt]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 'SHOW = 1' at line 1 /links.asp, line 1469
and the portal page just comes up mostly blank apart from the header
Any ideas anyone.
|
Oh....Is that it? |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 13 October 2003 : 17:08:59
|
Some mods use some sql commands in the queries that only access or MS SQL database will understand it. These access/ms sql related only queries won't work in mysql. You will need to make some changes to it for mysql databases.
Post the sql query that mysql is having a problem. You can do this by putting the following code right before line 1469:Response.Write strSql
Response.End then run the page again. It should show you the sql query along with the error message. |
Support Snitz Forums
|
|
|
choppermc
New Member
Australia
80 Posts |
Posted - 14 October 2003 : 05:23:04
|
Thanks Davio
Well I tried that little script and the page showed up, and it had this- SELECT CAT_ID, CAT_NAME FROM FORUM_LINKS_CATEGORIES ORDER BY CAT_NAME ASC inside the Categories & Subcategories box instead of any links.
Cheers, chopper |
Oh....Is that it? |
Edited by - choppermc on 14 October 2003 05:24:17 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 14 October 2003 : 10:59:51
|
That can't be right. The sql query should have 'SHOW = 1' in it, like the error said.
Post a link to a txt version of the in question, and I'll take a look at it. |
Support Snitz Forums
|
|
|
dpmcalister
Junior Member
United Kingdom
161 Posts |
Posted - 14 October 2003 : 12:36:57
|
IIRC, I had the same problem and I corrected it by changing all instances of 'SHOW = 1' to 'SHOWLINKS = 1' |
|
|
choppermc
New Member
Australia
80 Posts |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 15 October 2003 : 08:07:43
|
Chopper, change the Response.Write strSql code that I told you to add on line 1469, to Response.Write sqlcount then run the page again and paste the query that shows up. |
Support Snitz Forums
|
|
|
choppermc
New Member
Australia
80 Posts |
Posted - 15 October 2003 : 08:47:49
|
Ok Davio, now I get this- SELECT count(url) FROM FORUM_LINKS WHERE CATEGORY = 0 AND PARENT_ID = 1 AND SHOW = 1 |
Oh....Is that it? |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 15 October 2003 : 11:13:52
|
Do you have a column called SHOW in the FORUM_LINKS table? |
Support Snitz Forums
|
|
|
choppermc
New Member
Australia
80 Posts |
Posted - 15 October 2003 : 17:01:55
|
quote: Originally posted by Davio
Do you have a column called SHOW in the FORUM_LINKS table?
Yep |
Oh....Is that it? |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 16 October 2003 : 00:22:54
|
According to the MySQL Manual (http://www.mysql.com/doc/en/SHOW.html) the SHOW column name is a reserved mysql command. You will need to change the column name in the FORUM_LINKS table to something else, like SHOWLINKS as dpmcalister suggested. Then you need to search for SHOW in this file and change it to SHOWLINKS after you changed it in the database. |
Support Snitz Forums
|
|
|
choppermc
New Member
Australia
80 Posts |
Posted - 16 October 2003 : 07:21:58
|
Great stuff Davio, I finally got it to work....well almost. every thing works, except for when I click on a subcategory to view the list of links, I get an error-
Error Type: Microsoft VBScript runtime (0x800A01CA) Variable uses an Automation type not supported in VBScript /inc_func_links.asp, line 187
I had to make the changes you and dpmcalister suggested to 5 files and the database- I Changed SHOW to SHOWLINKS in the following-
links.asp-
inc_func_links.asp-
pop_links.asp-
admin_links.aspportal.asp-
FORUM_LINKS table
Here is the text copy of my inc_func_links.asp if you want to see if you can spot the problem with inc_func_links.asp.
Cheers |
Oh....Is that it? |
Edited by - choppermc on 18 October 2003 05:28:18 |
|
|
choppermc
New Member
Australia
80 Posts |
Posted - 18 October 2003 : 06:08:13
|
Wow Every things fixed now, I worked out where the last error was coming from, and the problem with the Portal page (took me ages). In my database table FORUM_LINKS the field "type" for LINK_ID was set to- int(11)unsigned I changed it to so it looked like this- int(11)
I did the same for tables FORUM_CMS_CATEGORY and FORUM_CMS_CONTENT to get my Portal page to work.
Note- there are other tables in my database with the unsigned type set to the primary key, but they don't seem to be causing any problems as yet.
Thanks for your help Davio and dpmcalister |
Oh....Is that it? |
|
|
Azzur
Starting Member
13 Posts |
Posted - 22 October 2003 : 14:39:21
|
sorry.. this topic it allows to also resolve the relative problems to sql. . on the sniz forum? I don't succeed in making to work the search, the new messages and the votes. . how can I do? ? ? Does someone help me?
|
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 22 October 2003 : 18:49:13
|
None of the database fields should be marked unsigned. Remove the unsigned option from those fields. That usually happens when you convert from an access database. |
Support Snitz Forums
|
|
|
OneWayMule
Dev. Team Member & Support Moderator
Austria
4969 Posts |
|
|
Topic |
|