PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Installs and Upgrade - vBulletin 3.5.X (http://www.photopost.com/forum/installs-upgrade-vbulletin-3-5-x/)
-   -   showimage.php? SQL error (http://www.photopost.com/forum/installs-upgrade-vbulletin-3-5-x/121797-showimage-php-sql-error.html)

Noxious December 28th, 2005 06:53 AM

showimage.php? SQL error
 
Database error in vBulletin 3.5.2:

Invalid SQL:

SELECT images.imageid, username, images.userid, images.title, images.catid, dateline, images.description, keywords, filename, thumbname, width, height, extension, filesize, originalname, originalfilesize, originalwidth, originalheight, views, posts, valid, open, sticky, votenum, votetotal, options, catimage, catuserid, membercat, useroptions, adv_setting, customfields.*
L
L
L
FROM adv_gallery_images AS images
LEFT JOIN adv_gallery_categories AS categories ON (images.catid = categories.catid)
LEFT JOIN adv_gallery_customfields_entries AS customfields ON (images.imageid = customfields.imgid)
L
L
L
WHERE images.imageid = '2';

MySQL Error : 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 'L
L
FROM adv_gallery_images AS images
LEFT JOIN adv_gallery_categories AS ' at line 3 Error Number : 1064
Date : Wednesday, December 28th 2005 @ 06:26:48 AM
Script : http://mysite.com/new_site/gallery/s...ge.php?i=2&c=2
Referrer : http://mysite.com/new_site/gallery/browseimages.php?c=2
IP Address : **.**.***.**
Username : Unregistered
Classname : vb_database

I've looked through the forums and can;t seem to find this so anyone know why this is happening??

Thanks

Noxious December 28th, 2005 07:01 AM

ah fixed it now, well it works

the problem code was

$image = $db->query_first("
SELECT images.imageid, username, images.userid, images.title, images.catid, dateline, images.description, keywords, filename, thumbname, width, height, extension, filesize, originalname, originalfilesize, originalwidth, originalheight, views, posts, valid, open, sticky, votenum, votetotal, options, catimage, catuserid, membercat, useroptions, adv_setting, customfields.*
$query[favfields]
$query[subfields]
$query[exiffields]
FROM " . TABLE_PREFIX . "adv_gallery_images AS images
LEFT JOIN " . TABLE_PREFIX ."adv_gallery_categories AS categories ON (images.catid = categories.catid)
LEFT JOIN " . TABLE_PREFIX . "adv_gallery_customfields_entries AS customfields ON (images.imageid = customfields.imgid)
$query[favjoin]
$query[subjoin]
$query[exifjoin]
WHERE images.imageid = '$imageid'
");

and i removed the lines in red

Zachariah December 28th, 2005 07:48 AM

Thank you for the info.
We will take a look and see whats going on.

I see it happened on "Username : Unregistered"
- Has this happened on a Member / Non-Guest?
- Can you list the settings of your "Guest" account for the gallery ?
- Custom settings of catagory 2 - if any.

993ti May 9th, 2006 08:54 PM

The same has happened to me now.
I'm logged in.
If i remove the lines in red above, it shows the image but if i post a reply, i get the same kind of error.
I tried uploading a fresh showimage.php and newreply.php but that didn't work.

It's strange though, i haven't changed anything :(
Here's the error i get when replying:
Code:

Content visible to verified customers only.
These lines are responsible (again in showimage.php):
Code:

Content visible to verified customers only.

993ti May 9th, 2006 09:03 PM

Now even removing the lines for showing the image doesn't work.
Could it be a server thingy?


All times are GMT -5. The time now is 02:30 PM.

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