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
 Problem with SQL statement
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jwashburn
Starting Member

28 Posts

Posted - 14 March 2006 :  18:43:55  Show Profile  Visit jwashburn's Homepage
I am trying to use
Latest Albums Add-On V1.2 for Burthold's Photo Album v1.82 for Snitz 3.4.xx
By Dave Clarke and Alan Dunne

I dont have access, I am using mysql and the syntax is apparently a little different. I am not t good with SQL statments.

Any ideas?


Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

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 'SELECT MAX(FA01.Photo_id)FROM FORUM_ALBUM AS FA01 WHERE FA01.Me

/forum/inc_latestalbumthumb2.asp, line 7

Podge
Support Moderator

Ireland
3776 Posts

Posted - 15 March 2006 :  07:59:58  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Can you add this line just before the line where the error is

response.write strSql

and post the result.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

jwashburn
Starting Member

28 Posts

Posted - 15 March 2006 :  10:06:48  Show Profile  Visit jwashburn's Homepage
SELECT F.FORUM_ID, F.F_STATUS, F.CAT_ID, F.F_SUBJECT, F.F_URL, F.F_TOPICS, F.F_COUNT, F.F_LAST_POST, F.F_LAST_POST_TOPIC_ID, F.F_LAST_POST_REPLY_ID, F.F_TYPE, F.F_ORDER, F.F_A_COUNT, F.F_SUBSCRIPTION, F_PRIVATEFORUMS, F_PASSWORD_NEW, M.MEMBER_ID, M.M_NAME, T.T_REPLIES, T.T_UREPLIES, F.F_DESCRIPTION FROM ((FORUM_FORUM F LEFT JOIN FORUM_MEMBERS M ON F.F_LAST_POST_AUTHOR = M.MEMBER_ID) LEFT JOIN FORUM_TOPICS T ON F.F_LAST_POST_TOPIC_ID = T.TOPIC_ID) ORDER BY F.F_ORDER ASC, F.F_SUBJECT ASC;

Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 15 March 2006 :  10:57:11  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
That can't be right. I don't have a copy of that mod. What is line 7 ?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 15 March 2006 :  15:24:34  Show Profile
Can you save inc_latestalbumthumb2.asp as inc_latestalbumthumb2.txt so we can see all the code ?
Go to Top of Page

jwashburn
Starting Member

28 Posts

Posted - 22 March 2006 :  12:01:26  Show Profile  Visit jwashburn's Homepage
You bet, sorry about the delay

Here are links to both the files in the mod

http://www.norcalmotocross.com/forum/Copy%20of%20inc_photo_album_update2.txt

http://www.norcalmotocross.com/forum/Copy of inc_latestalbumthumb2.txt

Go to Top of Page

ian9001
Starting Member

22 Posts

Posted - 22 March 2006 :  17:02:08  Show Profile
Interesting...I've got the exact same issue. I've used this Mod with both Access and MS Sql Server without any problems, but every time I try with MySql I get the exact same error as mentioned above. I posted the query on a MySql forum and the general opinion was that it was fine. However, it still doesn't run on my server!

Unfortunately I don't have sufficient Sql knowledge to rewrite it :(

I also posted it in the thread relating to the Mod without any success:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=60218&whichpage=2

Quite happy to post any files, but as they're likely to be the same as those already posted I don't see the point.

Shall watch this thread closely!

Ian

Go to Top of Page

jwashburn
Starting Member

28 Posts

Posted - 22 March 2006 :  19:08:28  Show Profile  Visit jwashburn's Homepage
Hey Ian, can you get the standard photo album mod to work? I cant even get the basic album to work. I migrated from Access to mysql. All the photo albums show up but no one can upload. It gives a Permission Denied error, yet there is nothing in the code that had permisson denied in it, so I think the database might be giving me that error

Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 22 March 2006 :  20:59:12  Show Profile
Some versions of mysql do not support subqueries. I'm not sure if any do.

Heres a corrected link if any one wants to have a look. http://www.norcalmotocross.com/forum/Copy%20of%20inc_latestalbumthumb2.txt

    _-/Cripto9t\-_
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 22 March 2006 :  21:03:35  Show Profile  Send ruirib a Yahoo! Message
MySQL 4.0 or greater support subqueries.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 23 March 2006 :  09:54:07  Show Profile
I don't have the photo album tables, but I got a similar query to work.
strSql= "SELECT MAX(FA1.Photo_id), FA1.Photo_Name, FAU1.Member_id, FAU1.M_NAME" & _
        " FROM FORUM_ALBUM_USERS AS FAU1, FORUM_ALBUM AS FA1" & _
        " WHERE FA1.Member_id = FAU1.Member_id" & _
        " AND FA1.Photo_Status = 1" & _
        " GROUP BY FA1.Member_id" & _
        " ORDER BY FA1.Photo_id DESC;"

You can try that but I think it will have to be "GROUP BY FA1.Photo_id" instead.
Member_id should work

    _-/Cripto9t\-_

Edited by - cripto9t on 23 March 2006 10:06:56
Go to Top of Page

ian9001
Starting Member

22 Posts

Posted - 23 March 2006 :  12:29:05  Show Profile
Nice one cripto9t, works a dream.

jwashburn - yeah, albums and latest uploads all tickety boo now. Don't know enough about MySql to advise you I'm afraid, sorry.

Ian
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.31 seconds. Powered By: Snitz Forums 2000 Version 3.4.07