 | |  | |
February 24th, 2005, 08:12 AM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Jul 2003
Posts: 81
| Invalid SQL
I got this error emailed to me twice last night. It must not happen very often since this is the first time I received it. Quote:
Invalid SQL:
SELECT images.imageid, filename, originalname, thumbname, extension, images.title, images.catid, sticky, open ,images.userid, images.title ,images.username, images.description, images.dateline ,width, height, originalwidth, originalheight, images.views, images.posts, votenum, votetotal, categories.title AS cattitle
FROM adv_gallery_images AS images
LEFT JOIN adv_gallery_categories AS categories USING (catid)
WHERE images.imageid IN(762,763,765)
ORDER BY lastpostdateline , imageid DESC
mysql error: Column: 'lastpostdateline' in order clause is ambiguous
mysql error number: 1052
| |
| |
February 24th, 2005, 08:29 AM
|
#2 (permalink)
| | Guest | Re: Invalid SQL
Can you post the entire error, inlcuding the script and referrer?
| |
| |
February 24th, 2005, 09:53 AM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Jul 2003
Posts: 81
| Re: Invalid SQL
Yes, I will post it when I get home after work.
|
| |
February 24th, 2005, 03:10 PM
|
#4 (permalink)
| | Member Verified Customer
Join Date: Jul 2003
Posts: 81
| Re: Invalid SQL
Here is the full error message minus the users IP: Quote:
Database error in vBulletin 3.0.6:
Invalid SQL:
SELECT images.imageid, filename, originalname, thumbname, extension, images.title, images.catid, sticky, open ,images.userid, images.title ,images.username, images.description, images.dateline ,width, height, originalwidth, originalheight, images.views, images.posts, votenum, votetotal, categories.title AS cattitle
FROM adv_gallery_images AS images
LEFT JOIN adv_gallery_categories AS categories USING (catid)
WHERE images.imageid IN(762,763,765)
ORDER BY lastpostdateline , imageid DESC
mysql error: Column: 'lastpostdateline' in order clause is ambiguous
mysql error number: 1052
Date: Thursday 24th of February 2005 12:36:34 AM
Script: http://www.dragonslist.com/gallery/b...&cutoffdate=-1
Referer: http://www.dragonslist.com/gallery/b...p?do=favorites
Username: EMEI KUNG FU
| |
| |
February 25th, 2005, 10:00 AM
|
#5 (permalink)
| | Guest | Re: Invalid SQL
Strange that this doesn't give an error on here, though it should. If you'll look in your forum/includes/functions_gallery.php file for this code: Code: Content visible to verified customers only.
And replace it with this: Code: Content visible to verified customers only.
Then that should take care of the problem.
| |
| |
February 25th, 2005, 11:03 AM
|
#6 (permalink)
| | Ultimate Member
Join Date: Jan 2004
Posts: 2,196
| Re: Invalid SQL
I'm guessing its MySQL 4.1.x
|
| |
March 11th, 2005, 12:17 PM
|
#7 (permalink)
| | Member Verified Customer
Join Date: Jan 2004 Location: McKinney, TX
Posts: 39
| Re: Invalid SQL Quote:
Database error in vBulletin 3.0.7:
Invalid SQL:
SELECT images.imageid, filename, originalname, thumbname, extension, images.title, images.catid, sticky, open ,images.userid, images.title ,images.username, images.dateline ,filesize, originalfilesize ,width, height, originalwidth, originalheight, images.views, images.posts, votenum, votetotal, categories.title AS cattitle
FROM adv_gallery_images AS images
LEFT JOIN adv_gallery_categories AS categories USING (catid)
WHERE images.imageid IN(27122,17609,13090)
ORDER BY lastpostdateline DESC, imageid DESC
mysql error: Column: 'lastpostdateline' in order clause is ambiguous
mysql error number: 1052
Date: Friday 11th of March 2005 12:12:17 PM
Script: http://www.royouth.com/gallery/brows...&imageuser=497
Referer: http://www.royouth.com/gallery/browseimages.php?c=521
Username: ymeaga1n
| I'm having same problem and I've made edit that you said Brian. It's the same no matter where I am coming from.
PHP Version 4.3.10
MySQL 4.0.22-standard
For the record, this just happened in last hour. Only things I changed was:
fixing the vb footer on moderate new option ( http://www.vbadvanced.com/forum/show...ghlight=footer)
fixing the sort options( http://www.vbadvanced.com/forum/showthread.php?t=6253)
|
| |
March 11th, 2005, 12:57 PM
|
#8 (permalink)
| | Member Verified Customer
Join Date: Jan 2004 Location: McKinney, TX
Posts: 39
| Re: Invalid SQL
Brian, I figured out why I was getting the error message. I had also changed the "Default Order" under Browse Category Options in the admincp to Last Post and that's when I started getting that message. I changed it back to date added and it worked fine. You probably already knew that though  hope it helps.
|
| |
March 15th, 2005, 02:16 PM
|
#9 (permalink)
| | Guest | Re: Invalid SQL
I can't seem to reproduce the problem. Would you mind submitting a support ticket so I can have a look?
| |
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 04:10 AM. | |