iDEV Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

IDEVSPOT COMMUNITY FORUMS. -----( ( ( NOT FOR OFFICIAL TECH SUPPORT ) ) )-----

Author Topic: MySql error  (Read 4672 times)

0 Members and 1 Guest are viewing this topic.

fmichaeld

  • Newbie
  • *
  • Posts: 2
    • View Profile
MySql error
« on: March 02, 2008, 08:58:07 AM »
I installed the script, but when I go to set up a Paypal Buy Now Profile and click apply.I get the following message:

Cannot query the database.
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 'RETURN ='http://1safelistcentral.com/ebaythkyou.html' , CANCEL_URL ='' ,' at line 5

I was able to set up a product, but the code doesn't include some fields..I am assuming this is because the paypal profile has not yet been set..

<form action=https://www.paypal.com/cgi-bin/webscr/mrb/pal=9QQVZHP6UK9L2 method=post>
<input type="hidden" name="bn" value="phppixie.com">
<input type=hidden name=cmd value=_xclick>
<input type="hidden" name="rm" value="1">
<input type=hidden name=business value=>
<input type=hidden name=item_name value="eBay Cash Flow Site with Master Resale Rights and Bonus Guide">
<input type=hidden name=item_number value="001">
<input type=hidden name=amount value=14.95>
<input type=hidden name=currency_code value=>
<input type=hidden name=image_url value=>
<input type=hidden name=return value=>
<input type=hidden name=cancel_return value=>
<input type=hidden name=custom value=MANUAL>
<input type=image src=>

<input type="hidden" name="notify_url" value="http://www.1safelistcentral.com/PP194250/download/pixie.php">

</form>

Thanks for your help
Logged

Clan Webs

  • Jr. Member
  • **
  • Gender: Male
  • Posts: 80
  • ClanHosting
    • View Profile
    • WWW
Re: MySql error
« Reply #1 on: March 02, 2008, 02:55:06 PM »
Need more info to find the problem send me the page that has the error on it
Do my fix it fast have lot work on

Thanks
will

contact@clan-webs.net
Logged

Need website code noprblem ASK ME
cheap code & DB work Email contact@clan-webs.net

fmichaeld

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: MySql error
« Reply #2 on: March 02, 2008, 10:04:51 PM »
Need more info to find the problem send me the page that has the error on it
Do my fix it fast have lot work on


download/forms/paypalsettings_add.php..When logged into admin under Create a PayPal Profile (BUY NOW)..After filling in the paypal addy, return url, cancel url and selecting the button to display I click apply, thats when I get the error.. I get the same error when I try to add a Profile under "ADD to CART"

UPDATE: This is actually the page the error is displayed on download/app/pa_ad.php
Here is the code in the file:

$idnumber       = $_POST['idnumber'];
$reciever_email = $_POST['reciever_email'];
$image_url      = $_POST['image_url'];
$return         = $_POST['return'];
$cancel_return  = $_POST['cancel_return'];
$image          = $_POST['image'];
$currency_code  = $_POST['currency_code'];
$type           = $_POST['type'];

if (empty($idnumber)) {
        echo 'You are required to enter an ID number for this item';
        die();
}

$SQL = "SELECT * from PAYPAYSETTINGS WHERE IDNUMBER='$idnumber'"; $result = mysql_query( $SQL );
while( $row = mysql_fetch_array( $result ) ) {
        $check = $row["IDNUMBER"];

        if ($idnumber == $check) {
                echo 'An item already exists with that Item ID Number. Please click "Back" and adjust it';
                die();
        }
}

$sql = "INSERT INTO PAYPAYSETTINGS SET IDNUMBER = '$idnumber' , RECIEVER_EMAIL = '$reciever_email' , IMAGE_URL = '$image_url' , RETURN = '$return' , CANCEL_URL = '$cancel_return' , IMAGE = '$image' , TYPE = '$type' , CURRENCY_CODE = '$currency_code'";
$query = mysql_query($sql) or die("Cannot query the database.<br>" . mysql_error());

Thanks again..

Michael

« Last Edit: March 02, 2008, 11:07:22 PM by fmichaeld »
Logged

himangi

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: MySql error
« Reply #3 on: July 13, 2009, 01:07:39 AM »
Hello,
Was this problem solved??
I am getting same error when I click apply for add to cart / buy now in paypal profiles.

Cannot query the database.
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 'RETURN = '' , CANCEL_URL = '' , IMAGE = 'http://www.arti-india.org/PayDownloadPa' at line 1

Can anyone help me with this?

thanks
Logged