Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-28-2005, 08:50 AM
andi02 andi02 is offline
 
Join Date: Sep 2005
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Complete db novice... Help Needed

Hi Everyone

Help Needed Please.

Whenever I save changes in User Cp - Edit Options, I get the error below.
Can anyone tell what the error is and how can I correct the problem without altering the rest of the db?
Any ideas guy's?

Thanks - Andy :ermm:

Database error in vBulletin 3.0.9:

Invalid SQL:
UPDATE user SET
styleid = 0,
showvbcode = 2,
pmpopup = 0,
maxposts = -1,
daysprune = 0,
timezoneoffset = '0',
startofweek = 1,
languageid = 0,
threadedmode = 0,
autosubscribe = -1,
showdonor = ,
options = 2263
WHERE userid = 1

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 '
options = 2263
WHERE userid = 1' at line 12

mysql error number: 1064

Script: profile.php
Reply With Quote
  #2  
Old 09-28-2005, 09:24 AM
Necron Necron is offline
 
Join Date: May 2004
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by andi02
showdonor = ,
that be it?
Reply With Quote
  #3  
Old 09-28-2005, 09:38 AM
pyro.699 pyro.699 is offline
 
Join Date: Sep 2005
Location: Fredericton, New Brunswic
Posts: 261
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

YEs, im 99.99932% shure thats it, because its telling it to do somethign, but you havent set anyhitng for it to do ^^
Reply With Quote
  #4  
Old 09-28-2005, 09:51 AM
andi02 andi02 is offline
 
Join Date: Sep 2005
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is going a little bit above my head?? - Does this mean its a PHP error or a db error?

the script in the profile.php is

// Add user choice to show donor status
if ($bbuserinfo['showdonor'] == '1'){
$checked['showdonor'] == HTML_CHECKED;
}
// End user choice to show donor status

AND THEN LATER IN THE SCRIPT

$DB_site->query("
UPDATE " . TABLE_PREFIX . "user SET
" . $updatestyles . "
showvbcode = $showvbcode,
pmpopup = $pmpopup,
maxposts = $umaxposts,
daysprune = $prunedays,
timezoneoffset = '$timezoneoffset',
startofweek = $startofweek,
languageid = $languageid,
threadedmode = $threadedmode,
autosubscribe = $autosubscribe,
showdonor = $showdonor,
options = " . convert_array_to_bits($options, $_USEROPTIONS) . "
WHERE userid = $bbuserinfo[userid]
");



Thanks

Andy
Reply With Quote
  #5  
Old 09-28-2005, 10:12 AM
Necron Necron is offline
 
Join Date: May 2004
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

change
showdonor = $showdonor,

to
showdonor = '$showdonor',

?
Reply With Quote
  #6  
Old 09-28-2005, 10:27 AM
andi02 andi02 is offline
 
Join Date: Sep 2005
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I took your kind advice but alas the problem continues only this time the error is slightly different. Take a look at the donor section now!

Invalid SQL:
UPDATE user SET
styleid = 0,
showvbcode = 2,
pmpopup = 0,
maxposts = -1,
daysprune = 0,
timezoneoffset = '0',
startofweek = 1,
languageid = 0,
threadedmode = 0,
autosubscribe = -1,
showdonor = $'showdonor',
options = 2263
WHERE userid = 1

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 ''showdonor',
options = 2263
WHERE userid = 1' at line 12

Best Regards
Andy
Reply With Quote
  #7  
Old 09-28-2005, 10:37 AM
Necron Necron is offline
 
Join Date: May 2004
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

but the ' before the $

showdonor = '$showdonor',

not
showdonor = $'showdonor',
Reply With Quote
  #8  
Old 09-28-2005, 10:44 AM
andi02 andi02 is offline
 
Join Date: Sep 2005
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep my mistake....

Well I've just tried again it's working now.

FANTASTIC

Thanks Loads

Best Regards
Andy :banana:
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:45 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04536 seconds
  • Memory Usage 2,222KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete