PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Bugs From 1.0.0 (http://www.photopost.com/forum/bugs-1-0-0/)
-   -   Invalid SQL (http://www.photopost.com/forum/bugs-1-0-0/117704-invalid-sql.html)

sifuhall February 24th, 2005 08:12 AM

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

Brian February 24th, 2005 08:29 AM

Re: Invalid SQL
 
Can you post the entire error, inlcuding the script and referrer?

sifuhall February 24th, 2005 09:53 AM

Re: Invalid SQL
 
Yes, I will post it when I get home after work.

sifuhall February 24th, 2005 03:10 PM

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

Brian February 25th, 2005 10:00 AM

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.

Zachery February 25th, 2005 11:03 AM

Re: Invalid SQL
 
I'm guessing its MySQL 4.1.x

cosmin March 11th, 2005 12:17 PM

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)

cosmin March 11th, 2005 12:57 PM

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.

Brian March 15th, 2005 02:16 PM

Re: Invalid SQL
 
I can't seem to reproduce the problem. Would you mind submitting a support ticket so I can have a look?


All times are GMT -5. The time now is 04:26 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97