#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    78
    Rep Power
    0

    Error in inp_error_log but works..


    Hi,
    just checked in my ipn_errors_log (for paypal verification) and I can see this error in the log everytime somebody does a purchase.
    However the script works.
    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 '1' at line 1

    not sure if the error should be on line 1 or not.
    There are several queries on the file, but on line 1 is the sql connection.
    Isnt this correct?
    $dbh=@mysql_connect ("localhost", "user", "pass") or exit(0);
    line 2
    mysql_select_db ("database", $dbh )or exit(0);

    thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2007
    Location
    Purley, Surrey
    Posts
    248
    Rep Power
    37
    It's refering to line 1 of the query. One of the queries you are running is invalid.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    78
    Rep Power
    0
    Originally Posted by TonyF123
    It's refering to line 1 of the query. One of the queries you are running is invalid.
    Its strange as all of them works,

    these are the queries if somebody can see something strange:
    [MYSQL]
    $sql = "SELECT COUNT(*) FROM orders WHERE txn_id = '$txn_id'";
    $r = mysql_query($sql);

    $sql = mysql_query("UPDATE orders SET txn_id='$txn_id', mc_gross='$mc_gross', statement='paid', payer_email='$payer_email' WHERE id = '$custom'");

    $query1= "SELECT * FROM orders WHERE id = '$custom'";
    $result = mysql_query ($query1);
    $query2= "SELECT email, id_propiedad FROM usuarios WHERE id_propiedad = '$item_name'";
    $result2 = mysql_query ($query2);
    while ($row = mysql_fetch_object($result)) {
    while ($row2 = mysql_fetch_array($result2)) {
    [/MYSQL]

    Thanks

IMN logo majestic logo threadwatch logo seochat tools logo