phase error

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   phase error
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 58
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
hello i have the bank mod installed i thought it was working right till i was in my admin page to save changes to the birthday mod and after i clicked sumitt i got this message.

Failed to update general configuration for bankname

DEBUG MODE

SQL Error : 1064 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 's National Bank' WHERE config_n

UPDATE nuke_bbconfig SET config_value = 'Stealth's National Bank' WHERE config_name = 'bankname'

Line : 99
File : /home/stealths/public_html/html/modules/Forums/admin/admin_board.php


this is the code from lines 93 to 101

elseif ($action == updatebank)
{
   $sql = array();
   $bankinfo = array();
   $sql[] = "select config_value from " . CONFIG_TABLE . " where config_name='bankname'";
   $sql[] = "select config_value from " . CONFIG_TABLE . " where config_name='bankinterest'";
   $sql[] = "select config_value from " . CONFIG_TABLE . " where config_name='bankfees'";
   $sql[] = "select config_value from " . CONFIG_TABLE . " where config_name='bankpayouttime'";
   $sql[] = "select config_value from " . CONFIG_TABLE . " where config_name='bankopened'";
   $sql_count = count($sql);
   for($i = 0; $i < $sql_count; $i++)
   {
      if ( !($result = $db->sql_query($sql[$i])) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Getting Bank Information!'); }
      $row = mysql_fetch_array($result);
      $bankinfo[] = $row['config_value'];
   }
   $banktime = time();
   $usql = array();
   if ($name != $bankinfo[0]) { $usql[] = "update ". CONFIG_TABLE . " set config_value='$name' where config_name='bankname'"; }
   if ($interestrate != $bankinfo[1]) { $usql[] = "update ". CONFIG_TABLE . " set config_value='$interestrate' where config_name='bankinterest'"; }
   if ($withdrawfees != $bankinfo[2]) { $usql[] = "update ". CONFIG_TABLE . " set config_value='$withdrawfee' where config_name='bankfees'"; }
   if ($paymenttime != $bankinfo[3]) { $usql[] = "update ". CONFIG_TABLE . " set config_value='$paymenttime' where config_name='bankpayouttime'"; }
   if ((strtolower($status) == off) && ($bankinfo[4] != off)) { $usql[] = "update ". CONFIG_TABLE . " set config_value='off' where config_name='bankopened'"; }
   if ((strtolower($status) == on) && ($bankinfo[4] == off)) { $usql[] = "update ". CONFIG_TABLE . " set config_value='$banktime' where config_name='bankopened'"; }
   $sql_count = count($usql);
   for($i = 0; $i < $sql_count; $i++) { if ( !($db->sql_query($usql[$i])) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Updating Bank Information!'); } }
   message_die(GENERAL_MESSAGE, 'Bank Sucessfully Updated!<br /><br />Click <a href="'.append_sid("admin_bank.".$phpEx).'">Here</a> to return to Bank Configuration.<br /><br />Click <a href="'.append_sid("index.".$phpEx."?pane=right").'">Here</a> to return to Admin Index.<br /><br />');
}


i am not sure if the installer worked right or not.



_________________
Back to top Reply with quote
#2   
aUsTiN
CZ Active Member
usa.gif georgia.gif
Age: 41
Gender: Male
Website:
Status: Offline
Joined: Sep 09, 2003
0.02 posts per day
Posts: 142
Points: 57
  MSN Messenger 
Take the apostrophe out of the bank name.



Back to top Reply with quote
#3   
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 58
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
ty




_________________
Back to top Reply with quote
#4   
aUsTiN
CZ Active Member
usa.gif georgia.gif
Age: 41
Gender: Male
Website:
Status: Offline
Joined: Sep 09, 2003
0.02 posts per day
Posts: 142
Points: 57
  MSN Messenger 
That fix it i guess?



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum