Author Topic: HELP !!!! Database Errror!  (Read 5249 times)

Offline Dr.Vista

HELP !!!! Database Errror!
« on: September 17, 2007, 09:42:46 am »
Why Do I Get This Following Error When I Use A Item From My Shop??
Code: [Select]
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 ')
ORDER BY mem.lngfile
LIMIT 0' at line 8
File: /home/drvista/public_html/forum/Sources/Subs-Post.php
Line: 774

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.3, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php.

Offline inkstains

Re: HELP !!!! Database Errror!
« Reply #1 on: September 17, 2007, 12:58:54 pm »
theres an error in your item file

Offline Dr.Vista

Re: HELP !!!! Database Errror!
« Reply #2 on: September 18, 2007, 06:49:31 am »
theres an error in your item file
really?how do i fix it?

Offline Daniel15

Re: HELP !!!! Database Errror!
« Reply #3 on: September 21, 2007, 10:34:20 am »
Could you please attach your Subs-Post.php file here so we can check what's on line 774?
And does this happen for all items?

Offline Dr.Vista

Re: HELP !!!! Database Errror!
« Reply #4 on: September 23, 2007, 04:11:43 am »
Could you please attach your Subs-Post.php file here so we can check what's on line 774?
And does this happen for all items?
Heres The File. http://www.mediafire.com/?5gxnhemxcxz

Offline inkstains

Re: HELP !!!! Database Errror!
« Reply #5 on: September 23, 2007, 04:19:44 am »
does it happen with all items or just one?

EDIT: had a look at your subs file and it looks ok to me so i'm guessing it's just a single item that is throwing that error. can you attach the item file.
« Last Edit: September 23, 2007, 04:35:39 am by inkstains »

Offline Dr.Vista

Re: HELP !!!! Database Errror!
« Reply #6 on: September 23, 2007, 09:40:39 am »
does it happen with all items or just one?

EDIT: had a look at your subs file and it looks ok to me so i'm guessing it's just a single item that is throwing that error. can you attach the item file.
Yes Its The Redball2 Item

Offline inkstains

Re: HELP !!!! Database Errror!
« Reply #7 on: September 23, 2007, 10:32:05 am »
can you attach the item please

Offline Dr.Vista

Re: HELP !!!! Database Errror!
« Reply #8 on: October 04, 2007, 06:25:29 am »
Quote
can you attach the item please
Okay,Heres The Link http://www.mediafire.com/?0omnzun9g1h
Thanks Guys I posted this along time ago and no one has responded me! Thanks for the great service! Know I can recommend this service to all my friends. >:( :knuppel2: :tickedoff: :tickedoff: :tickedoff: :tickedoff: :tickedoff:
« Last Edit: October 04, 2007, 06:27:52 am by Dr.Vista »

Offline Padre

Re: HELP !!!! Database Errror!
« Reply #9 on: October 04, 2007, 09:55:29 am »
Quote
can you attach the item please
Okay,Heres The Link http://www.mediafire.com/?0omnzun9g1h
Know I can recommend this service to all my friends. >:( :knuppel2: :tickedoff: :tickedoff: :tickedoff: :tickedoff: :tickedoff:
Wow, revenues will surely plummet now ............... never complain about free service  O0

Offline inkstains

Re: HELP !!!! Database Errror!
« Reply #10 on: October 04, 2007, 07:07:26 pm »
sometimes it takes a while man, i'm only a user of SMFShop just like you but i'll give a hand around here sometimes because it can take a while to get an answer and i know what it's like to wait and want to get stuff done. anyways i don't have redball installed anywhere so can't test this. but you can give it a go if you want.

make a backup of your Redball2 file then try using the below code

Code: [Select]
<?php

/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|         (c) 2006 DanSoft Australia           |
|      http://www.dansoftaustralia.net/        |
\**********************************************/

//File: Redball2.php

// VERSION: 2.3 (Build 11)
// $Date: 2006-11-17 13:34:18 +1000 (Fri, 17 Nov 2006) $
// $Id: Redball2.php 24 2006-10-21 03:34:18Z Mh $
global $sourcedir;
require_once(
$sourcedir '/Subs-Post.php');
class 
item_Redball2 extends itemTemplate {
    
    function 
getItemDetails() {

$this->authorName "Masterhand";
                
$this->authorWeb "http://www.gameandcoders.uni.cc";
$this->authorEmail "austin.r.tanay@gmail.com";

          
$this->name "RedBall2";
          
          
$this->desc "Redball 2";
          
// The item's price
          
$this->price 100;

       
   
          
$this->require_input true;
         
          
$this->can_use_item true;
    }

    
      function 
getAddInput() {
        return 
"Max amount to give: <input type='text' name='info1' value='100'><br>
               Max amount to take: <input type='text' name='info2' value='-100'>"
;
    
}  


       function 
getUseInput() {
       
global 
$context$scripturl$settings$txt;
        return 
"Bounce To: <input type='text' name='stealfrom' size='50'>
         <a href='
{$scripturl}?action=findmember;input=stealfrom;quote=0;sesc={$context['session_id']}' onclick='return reqWin(this.href, 350, 400);'><img src='{$settings['images_url']}/icons/assist.gif' border='0' alt='{$txt['find_members']}' /> Find Member</a>";
    }
    
    function 
onUse() {
        global 
$db_prefix$ID_MEMBER$user$item_info;
   
$pmfrom = array(
            
'id' => 1,
            
'name' => 'Admin',
            
'username' => 'Admin'
        
);
        
        
$pmto = array(
            
'to' => array($_POST['stealfrom']),
            
'bcc' => array()
        );
     
$result db_query("SELECT realName
                                FROM 
{$db_prefix}members
                                WHERE ID_MEMBER = 
{$ID_MEMBER}"__FILE____LINE__);
     
$row mysql_fetch_array($resultMYSQL_ASSOC);
$user $row["realName"];

       if (
$user == $_POST['stealfrom']) {
return 
"You cant throw it too yourself!";
die();
  }

else {
$amount mt_rand($item_info[2], $item_info[1]);

$result db_query("UPDATE {$db_prefix}members
                                SET money = money + 
{$amount}
                                WHERE realName = '
{$_POST['stealfrom']}'"__FILE____LINE__);
                                
sendpm($pmto'Heres a redball?'"<b>{$user}</b> Bounces The Ball To You And You Lose/Win ".formatMoney($amount)."! [i] You do not need to reply to this automated message"0$pmfrom); ;
                                return 
"You've thrown the ball to {$_POST['stealfrom']} if he catches it he'll gain money, else he'll lose it!!!";

       
$result db_query("SELECT ID_MEMBER
       FROM 
{$db_prefix}members
       WHERE realName = '
{$_POST['stealfrom']}'"__FILE____LINE__);
       
$row mysql_fetch_array($resultMYSQL_ASSOC);


            }

  }
  }

?>

this was taken from the Redball item thread here and just given a couple of tweaks.

http://www.daniel15.com/forum/index.php/topic,415.0.html