vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Calendar Search and Comments for Events (https://vborg.vbsupport.ru/showthread.php?t=78210)

YLP1 06-03-2005 03:20 AM

Hi everyone,

I get this DB error intermittingly and it has been driving me nuts. I have searched high and low for an answer on correcting this but it still rears it's ugly head Can someone help me fix this issue? Any help is greatly appreciated:

Code:

Database error in vBulletin 3.0.7:
Invalid SQL:
SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline
FROM vb3_user AS user
LEFT JOIN vb3_avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN vb3_customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.userid =
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 '' at line 5
mysql error number: 1064

And this is what that section of the Calendar.php looks like:
Code:


$eventcomments = $DB_site->query("

SELECT eventcomments.*, event.lastevecomdateline,user.*,userfield.*,usertextfield.signature " . iif($vboptions['avatarenabled'], ", customavatar.dateline AS avatardateline") . " FROM " . TABLE_PREFIX . "eventcomments AS eventcomments

LEFT JOIN " . TABLE_PREFIX . "event AS event ON(event.eventid=eventcomments.eventid)

LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid=eventcomments.evecomuserid)

LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON(userfield.userid=eventcomments.evecomuserid)

LEFT JOIN " . TABLE_PREFIX . "usertextfield as usertextfield ON(usertextfield.userid=eventcomments.evecomuserid)

" . iif($vboptions['avatarenabled'], "LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = eventcomments.evecomuserid)") . "

WHERE eventcomments.eventid=$eventid

ORDER BY eventcomments.evecomid ASC

LIMIT $startingfrom, $perpage

");



$evecomrow = $DB_site->num_rows($eventcomments);



Marco van Herwaarden 06-03-2005 04:52 AM

This is not the part of the code that get that error.

YLP1 06-03-2005 05:33 PM

I was taking a stab at it as I am a newbie at PHP.....any ideas?

Marco van Herwaarden 06-03-2005 06:10 PM

The original error message will also tell you in what script and which line the error occured.

YLP1 06-03-2005 06:58 PM

That's part of the problem...this same error occurs on several pages like the index.php, showthread.php and private messenging pages.... I can't isolate it.

deathemperor 06-04-2005 01:40 AM

Quote:

Originally Posted by YLP1
That's part of the problem...this same error occurs on several pages like the index.php, showthread.php and private messenging pages.... I can't isolate it.

which means this error is not from this hack, so I'm sorry I cannot provide you any fix for this

SamirDarji 06-04-2005 07:42 AM

Quote:

Originally Posted by YLP1
Hi everyone,

I get this DB error intermittingly and it has been driving me nuts. I have searched high and low for an answer on correcting this but it still rears it's ugly head Can someone help me fix this issue? Any help is greatly appreciated:

Code:

Database error in vBulletin 3.0.7:
Invalid SQL:
SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline
FROM vb3_user AS user
LEFT JOIN vb3_avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN vb3_customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.userid =
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 '' at line 5
mysql error number: 1064

And this is what that section of the Calendar.php looks like:
Code:


$eventcomments = $DB_site->query("

SELECT eventcomments.*, event.lastevecomdateline,user.*,userfield.*,usertextfield.signature " . iif($vboptions['avatarenabled'], ", customavatar.dateline AS avatardateline") . " FROM " . TABLE_PREFIX . "eventcomments AS eventcomments

LEFT JOIN " . TABLE_PREFIX . "event AS event ON(event.eventid=eventcomments.eventid)

LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid=eventcomments.evecomuserid)

LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON(userfield.userid=eventcomments.evecomuserid)

LEFT JOIN " . TABLE_PREFIX . "usertextfield as usertextfield ON(usertextfield.userid=eventcomments.evecomuserid)

" . iif($vboptions['avatarenabled'], "LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = eventcomments.evecomuserid)") . "

WHERE eventcomments.eventid=$eventid

ORDER BY eventcomments.evecomid ASC

LIMIT $startingfrom, $perpage

");



$evecomrow = $DB_site->num_rows($eventcomments);



Well, the error has to do with avatars. Try disabling avatars to see if the error goes away. That's a start in the right direction.

deathemperor 06-04-2005 10:38 AM

nah, that still does nothing to my hack, I never used something like this
PHP Code:

NOT ISNULL(avatardata

in it, sorry I can't help you out.

Antivirus 08-07-2005 03:33 AM

Just installed this- it's closest hack i could find that allows us to do what we want to do with tracking events and their feedback from members. I'm going to be playing around with it onn our test boards for next few days and so far everything looks great. [virus clicks install]

I had the following problem, not sure if anyoe else noticed this in one of the templates the install file uploaded...

In the calendar_searchevents template, there was a <table> tag that wasn't closed, it caused an odd column on the right hand side and messed up the footer (only for the Search Events page) so after figuring it out, i just added the closing </table> tag and it's beautiful. I attached screenies for people in case they have the same problem as shown, this would be your fix...

In calendar_searchevents template...

Find:
Code:

                <div style="margin-top:6px">
                <input type="submit" class="button" name="dosearch" value="Search Now" accesskey="s" />
                <input type="reset" class="button" value="Reset Fields" accesskey="r" onclick="window.location=\'calendar.php?do=search\';" />
                </div>
        </td>
</tr>
</table>
</form>


And add below:
Code:

</table>
before and after screenies attached. Thanks again death!
:banana:

bjs144 08-26-2005 10:41 AM

Fantastic Mod, many thanks


All times are GMT. The time now is 08:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01243 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete