Why isn't this query working in python?

E

erikcw

Hi all,

I'm trying to run the following query:

amember_db = MySQLdb.connect(host="localhost", user="**********",
passwd="*****", db="*******")
# create a cursor
self.amember_cursor = amember_db.cursor()
# execute SQL statement
sql = """SELECT payment_id FROM amember_payments WHERE
member_id=%s AND expire_date > NOW() AND completed=1 AND (product_id
11 AND product_id <21)""", (self.uid)
print sql
self.amember_cursor.execute(*sql)
amember_result = self.cursor.fetchall()
print amember_result

When I manually run the SQL query in mysql, I get a result, but for
some reason I get an empty result in python. Here are some notes that
may be of importance.

-I have 2 connections open to MySQL in this script (they are both in
seperate objects of course)
- self.uid = 1972L
-print amember_result = ()

Any ideas?

Thanks!
Erik
 
D

Dave Borne

I'm trying to run the following query:
....
member_id=%s AND expire_date > NOW() AND completed=1 AND (product_id

Shouldn't you be using the bind variable '?' instead of '%s' ?
(I'm asking because I'm not entirely sure how the execute command is
doing the substitution)

-Dave
 
E

erikcw

Shouldn't you be using the bind variable '?' instead of '%s' ?
(I'm asking because I'm not entirely sure how the execute command is
doing the substitution)

-Dave

Hi Dave,

I'm not sure. I've been using this format for all of my other queries
without issue. What would the query look like with the bind variable
instead?

Erik
 
C

Carsten Haese

Shouldn't you be using the bind variable '?' instead of '%s' ?

The parameter placeholder for MySQLdb is, indeed and unfortunately, %s.
The OP is using parameter substitution correctly, though in an
obfuscated fashion. 'sql' is a misnamed tuple containing both the query
string *and* the parameters, which is being unpacked with '*' into two
arguments to the execute call.

The only problem I see is that the parameters should be a sequence, i.e.
(self.uid,) instead of just (self.uid).

HTH,
 
E

erikcw

The parameter placeholder for MySQLdb is, indeed and unfortunately, %s.
The OP is using parameter substitution correctly, though in an
obfuscated fashion. 'sql' is a misnamed tuple containing both the query
string *and* the parameters, which is being unpacked with '*' into two
arguments to the execute call.

The only problem I see is that the parameters should be a sequence, i.e.
(self.uid,) instead of just (self.uid).

HTH,

I tried adding the comma to make it a sequence - but now change.

('SELECT payment_id FROM amember_payments WHERE member_id=%s AND
expire_date > NOW() AND completed=1 AND (product_id >11 AND product_id
<21)', (1608L,))
()

What else could it be?

Thanks!
Erik
 
S

Steve Holden

erikcw said:
I tried adding the comma to make it a sequence - but now change.

('SELECT payment_id FROM amember_payments WHERE member_id=%s AND
expire_date > NOW() AND completed=1 AND (product_id >11 AND product_id
<21)', (1608L,))
()

What else could it be?

Thanks!
Erik
It *could* be that there aren't any data meeting the criteria in your
query. Is there any chance that the current date/time has passed the
expire date since you ran the query manually?

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------
 
C

Carsten Haese

I tried adding the comma to make it a sequence - but now change.

('SELECT payment_id FROM amember_payments WHERE member_id=%s AND
expire_date > NOW() AND completed=1 AND (product_id >11 AND product_id
<21)', (1608L,))
()

What else could it be?

We won't know until you post more information. Show us the create table
statement for amember_payments, show us the query you're running
manually and the results you're getting from running the query manually.
Maybe that'll give us a clue. (Include the member_id, expire_date,
completed, and product_id columns in your manual query, please.)
 
J

John Machin

I tried adding the comma to make it a sequence - but now change.

('SELECT payment_id FROM amember_payments WHERE member_id=%s AND
expire_date > NOW() AND completed=1 AND (product_id >11 AND product_id
<21)', (1608L,))
()

What else could it be?

Possibly a type mismatch. How is member_id declared in the CREATE
TABLE? For diagnostic purposes, try passing in (1608,) and ('1608',).
 
E

erikcw

Possibly a type mismatch. How is member_id declared in the CREATE
TABLE? For diagnostic purposes, try passing in (1608,) and ('1608',).

Here is a copy of the table schema and the first 2 rows.

-- phpMyAdmin SQL Dump
-- version 2.9.0.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 27, 2007 at 11:29 AM
-- Server version: 5.0.27
-- PHP Version: 4.4.2
--
-- Database: `lybp_lybp`
--

-- --------------------------------------------------------

--
-- Table structure for table `amember_payments`
--

CREATE TABLE `amember_payments` (
`payment_id` int(11) NOT NULL auto_increment,
`member_id` int(11) NOT NULL default '0',
`product_id` int(11) NOT NULL default '0',
`begin_date` date NOT NULL default '0000-00-00',
`expire_date` date NOT NULL default '0000-00-00',
`paysys_id` varchar(32) NOT NULL default '',
`receipt_id` varchar(32) NOT NULL default '',
`amount` decimal(12,2) NOT NULL default '0.00',
`completed` smallint(6) default '0',
`remote_addr` varchar(15) NOT NULL default '',
`data` text,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP on update
CURRENT_TIMESTAMP,
`aff_id` int(11) NOT NULL default '0',
`payer_id` varchar(255) NOT NULL default '',
`coupon_id` int(11) NOT NULL default '0',
`tm_added` datetime NOT NULL default '0000-00-00 00:00:00',
`tm_completed` datetime default NULL,
`tax_amount` decimal(12,2) NOT NULL default '0.00',
PRIMARY KEY (`payment_id`),
KEY `member_id` (`member_id`),
KEY `payer_id` (`payer_id`),
KEY `coupon_id` (`coupon_id`),
KEY `tm_added` (`tm_added`,`product_id`),
KEY `tm_completed` (`tm_completed`,`product_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=11020 ;

--
-- Dumping data for table `amember_payments`
--

INSERT INTO `amember_payments` VALUES (423, 107, 1, '2004-10-01',
'2004-10-21', 'authorize_aim', '5687944', 3.95, 1, '', NULL,
'2004-11-30 19:21:43', 0, '', 0, '2004-11-30 19:21:43', '2004-11-30
19:21:43', 0.00);
INSERT INTO `amember_payments` VALUES (422, 107, 1, '2004-10-22',
'2004-11-21', 'authorize_aim', '5873225', 9.95, 1, '', NULL,
'2004-11-30 19:22:18', 0, '', 0, '2004-11-30 19:20:13', '2004-11-30
19:20:13', 0.00);

Thanks for your help!
Erik
 
S

Steve Holden

Steve said:
Does your table actually contain any rows that meet
the criteria that expire_date is in the future,
completed is 1, product id is between 11 and 21, etc.?

Have you tried debugging the SQL outside of Python?
This thread all started because a manual query was claimed to succeed
when a Python-based one was claimed not to.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------
 
S

Steve Holden

erikcw said:
Here is a copy of the table schema and the first 2 rows.

-- phpMyAdmin SQL Dump
-- version 2.9.0.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 27, 2007 at 11:29 AM
-- Server version: 5.0.27
-- PHP Version: 4.4.2
--
-- Database: `lybp_lybp`
--

-- --------------------------------------------------------

--
-- Table structure for table `amember_payments`
--

CREATE TABLE `amember_payments` (
`payment_id` int(11) NOT NULL auto_increment,
`member_id` int(11) NOT NULL default '0',
`product_id` int(11) NOT NULL default '0',
`begin_date` date NOT NULL default '0000-00-00',
`expire_date` date NOT NULL default '0000-00-00',
`paysys_id` varchar(32) NOT NULL default '',
`receipt_id` varchar(32) NOT NULL default '',
`amount` decimal(12,2) NOT NULL default '0.00',
`completed` smallint(6) default '0',
`remote_addr` varchar(15) NOT NULL default '',
`data` text,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP on update
CURRENT_TIMESTAMP,
`aff_id` int(11) NOT NULL default '0',
`payer_id` varchar(255) NOT NULL default '',
`coupon_id` int(11) NOT NULL default '0',
`tm_added` datetime NOT NULL default '0000-00-00 00:00:00',
`tm_completed` datetime default NULL,
`tax_amount` decimal(12,2) NOT NULL default '0.00',
PRIMARY KEY (`payment_id`),
KEY `member_id` (`member_id`),
KEY `payer_id` (`payer_id`),
KEY `coupon_id` (`coupon_id`),
KEY `tm_added` (`tm_added`,`product_id`),
KEY `tm_completed` (`tm_completed`,`product_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=11020 ;

--
-- Dumping data for table `amember_payments`
--

INSERT INTO `amember_payments` VALUES (423, 107, 1, '2004-10-01',
'2004-10-21', 'authorize_aim', '5687944', 3.95, 1, '', NULL,
'2004-11-30 19:21:43', 0, '', 0, '2004-11-30 19:21:43', '2004-11-30
19:21:43', 0.00);
INSERT INTO `amember_payments` VALUES (422, 107, 1, '2004-10-22',
'2004-11-21', 'authorize_aim', '5873225', 9.95, 1, '', NULL,
'2004-11-30 19:22:18', 0, '', 0, '2004-11-30 19:20:13', '2004-11-30
19:20:13', 0.00);

Thanks for your help!
Erik
I feel obliged to point out that there ARE no rows meeting the criteria
you query specified!

mysql> SELECT expire_date, NOW() FROM amember_payments;
+-------------+---------------------+
| expire_date | NOW() |
+-------------+---------------------+
| 2004-10-21 | 2007-05-27 15:59:21 |
| 2004-11-21 | 2007-05-27 15:59:21 |
+-------------+---------------------+
2 rows in set (0.02 sec)

mysql>

So I am not sure how you managed to get a manual query to work, but do
be sure that the Python query you mentioned at the start of the thread

sql = """SELECT payment_id FROM amember_payments WHERE
member_id=%s AND expire_date > NOW() AND completed=1 AND (product_id
doesn't stand a chance of returning any results unless you use a time
machine to go back almost three years!

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------
 
D

davelist

I feel obliged to point out that there ARE no rows meeting the
criteria
you query specified!

mysql> SELECT expire_date, NOW() FROM amember_payments;
+-------------+---------------------+
| expire_date | NOW() |
+-------------+---------------------+
| 2004-10-21 | 2007-05-27 15:59:21 |
| 2004-11-21 | 2007-05-27 15:59:21 |
+-------------+---------------------+
2 rows in set (0.02 sec)

mysql>

So I am not sure how you managed to get a manual query to work, but do
be sure that the Python query you mentioned at the start of the thread

sql = """SELECT payment_id FROM amember_payments WHERE
member_id=%s AND expire_date > NOW() AND completed=1 AND (product_id


And doesn't the above comma, need to be a percent symbol?

Dave
 
E

erikcw

I feel obliged to point out that there ARE no rows meeting the criteria
you query specified!

mysql> SELECT expire_date, NOW() FROM amember_payments;
+-------------+---------------------+
| expire_date | NOW() |
+-------------+---------------------+
| 2004-10-21 | 2007-05-27 15:59:21 |
| 2004-11-21 | 2007-05-27 15:59:21 |
+-------------+---------------------+
2 rows in set (0.02 sec)

mysql>

So I am not sure how you managed to get a manual query to work, but do
be sure that the Python query you mentioned at the start of the thread

sql = """SELECT payment_id FROM amember_payments WHERE
member_id=%s AND expire_date > NOW() AND completed=1 AND (product_id
doesn't stand a chance of returning any results unless you use a time
machine to go back almost three years!

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------

The rows I posted are just a small sample (the first 2). There are
tens of thousands of rows in the table.

Also, yes, the query does work when I run it manually against MySQL.
 
S

Steve Holden

And doesn't the above comma, need to be a percent symbol?
Nope.


--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------
 
D

Dennis Lee Bieber

No. The poster is using parameter passing, not string formatting.

It's confusing, as the example shown is not the common form for
parameter passing on the .execute() call -- without the .execute() it is
unclear. I presume the .execute() is using *sql to unpack the tuple...
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
G

Gabriel Genellina

En Mon, 28 May 2007 14:53:57 -0300, Dennis Lee Bieber
It's confusing, as the example shown is not the common form for
parameter passing on the .execute() call -- without the .execute() it is
unclear. I presume the .execute() is using *sql to unpack the tuple...

Yes, the original message said self.amember_cursor.execute(*sql)
It IS confusing...
 
E

erikcw

En Mon, 28 May 2007 14:53:57 -0300, Dennis Lee Bieber



Yes, the original message said self.amember_cursor.execute(*sql)
It IS confusing...

This is how I've always writing my queries. I learned it from some
tutorial I found on Google when I started - what is the preferred/
pythonic way to write this query?

Thanks!
Erik
 
S

Steve Holden

erikcw said:
This is how I've always writing my queries. I learned it from some
tutorial I found on Google when I started - what is the preferred/
pythonic way to write this query?
Use separate names for the SQL statement and the argument tuple, then
pass them as two separate arguments to cursor.execute().

Apart from anything else this makes it somewhat easier to use the same
statement with different arguments. But it is no different in principle
than what you are doing now, so the change won't remove your bug, I'm
afraid.

Could you show us a query (with actual results, if you can publish them)
that works manually but doesn't work in Python? There has to be
something pretty simple wrong here.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------
 
E

erikcw

--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------

The SQL my script is generating is still returning an empty
recordset. However, when I run SELECT * FROM amember_payments WHERE
member_id=2124 AND expire_date > NOW() AND completed=1 AND (product_id
11 AND product_id <21) directly in phpMyAdmin - it works.

Here is an updated subset of the database that should work better for
testing:

CREATE TABLE `amember_payments` (
`payment_id` int(11) NOT NULL auto_increment,
`member_id` int(11) NOT NULL default '0',
`product_id` int(11) NOT NULL default '0',
`begin_date` date NOT NULL default '0000-00-00',
`expire_date` date NOT NULL default '0000-00-00',
`paysys_id` varchar(32) NOT NULL default '',
`receipt_id` varchar(32) NOT NULL default '',
`amount` decimal(12,2) NOT NULL default '0.00',
`completed` smallint(6) default '0',
`remote_addr` varchar(15) NOT NULL default '',
`data` text,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP on update
CURRENT_TIMESTAMP,
`aff_id` int(11) NOT NULL default '0',
`payer_id` varchar(255) NOT NULL default '',
`coupon_id` int(11) NOT NULL default '0',
`tm_added` datetime NOT NULL default '0000-00-00 00:00:00',
`tm_completed` datetime default NULL,
`tax_amount` decimal(12,2) NOT NULL default '0.00',
PRIMARY KEY (`payment_id`),
KEY `member_id` (`member_id`),
KEY `payer_id` (`payer_id`),
KEY `coupon_id` (`coupon_id`),
KEY `tm_added` (`tm_added`,`product_id`),
KEY `tm_completed` (`tm_completed`,`product_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=11508 ;
INSERT INTO `amember_payments` VALUES (10710, 970, 8, '2007-05-05',
'2007-06-05', 'authorize_aim', '1424138558', '19.95', 1,
'71.229.108.131', 'a:6:{s:15:"COUPON_DISCOUNT";N;s:10:"TAX_AMOUNT";N;s:
5:"TAXES";N;i:0;a:1:{s:12:"RENEWAL_ORIG";s:19:"RENEWAL_ORIG: 10325";}i:
1;a:25:{s:7:"x_Login";s:12:"478459b79866";s:9:"x_Version";s:3:"3.1";s:
12:"x_Delim_Data";s:4:"True";s:10:"x_Tran_Key";s:
16:"eeRay89XQNAic8KJ";s:12:"x_Delim_Char";s:1:"|";s:
13:"x_Invoice_Num";s:9:"10710-329";s:8:"x_Amount";s:5:"19.95";s:
15:"x_Currency_Code";s:3:"USD";s:10:"x_Card_Num";s:19:"**** **** ****
4020";s:10:"x_Exp_Date";s:4:"1007";s:6:"x_Type";s:12:"AUTH_CAPTURE";s:
16:"x_Relay_Response";s:5:"FALSE";s:7:"x_Email";s:
20:"(e-mail address removed)";s:13:"x_Description";s:11:"The AdTool-";s:
9:"x_Cust_ID";s:3:"970";s:12:"x_First_Name";s:5:"Larry";s:
11:"x_Last_Name";s:6:"Ritter";s:9:"x_Address";s:21:"107 E Mt Pleasant
Ave";s:6:"x_City";s:10:"Livingston";s:7:"x_State";s:2:"NJ";s:
5:"x_Zip";s:5:"07039";s:9:"x_Country";s:2:"US";s:9:"x_Company";s:
27:"Israel Tour Connection, LLC";s:13:"x_Customer_IP";s:
13:"64.139.74.236";s:7:"x_Phone";s:10:"9735352575";}i:2;a:7:{s:
6:"RESULT";s:1:"1";s:10:"RESULT_SUB";s:1:"1";s:11:"REASON_CODE";s:
1:"1";s:7:"RESPMSG";s:35:"This transaction has been approved.";s:
3:"AVS";s:1:"Y";s:5:"PNREF";s:10:"1424138558";s:9:"CVV_VALID";s:
0:"";}}', '2007-05-06 10:52:25', 0,
'cc:d41d8cd98f00b204e9800998ecf8427e', 0, '2007-05-06 10:52:22',
'2007-05-06 10:52:25', '0.00');
INSERT INTO `amember_payments` VALUES (10711, 2124, 18, '2007-05-05',
'2007-06-26', 'authorize_aim', '1424138585', '97.00', 1,
'71.229.108.131', 'a:8:{s:15:"COUPON_DISCOUNT";N;s:10:"TAX_AMOUNT";N;s:
5:"TAXES";N;i:0;a:1:{s:12:"RENEWAL_ORIG";s:19:"RENEWAL_ORIG: 10326";}i:
1;a:25:{s:7:"x_Login";s:12:"478459b79866";s:9:"x_Version";s:3:"3.1";s:
12:"x_Delim_Data";s:4:"True";s:10:"x_Tran_Key";s:
16:"eeRay89XQNAic8KJ";s:12:"x_Delim_Char";s:1:"|";s:
13:"x_Invoice_Num";s:9:"10711-845";s:8:"x_Amount";s:5:"97.00";s:
15:"x_Currency_Code";s:3:"USD";s:10:"x_Card_Num";s:19:"**** **** ****
6006";s:10:"x_Exp_Date";s:4:"0709";s:6:"x_Type";s:12:"AUTH_CAPTURE";s:
16:"x_Relay_Response";s:5:"FALSE";s:7:"x_Email";s:
25:"(e-mail address removed)";s:13:"x_Description";s:21:"Winner Alert
Pro User";s:9:"x_Cust_ID";s:4:"2124";s:12:"x_First_Name";s:4:"Kirt";s:
11:"x_Last_Name";s:11:"Christensen";s:9:"x_Address";s:19:"3402 S.
Melissa Dr.";s:6:"x_City";s:14:"Spokane Valley";s:7:"x_State";s:
2:"WA";s:5:"x_Zip";s:5:"99206";s:9:"x_Country";s:2:"US";s:
9:"x_Company";s:0:"";s:13:"x_Customer_IP";s:14:"67.185.167.174";s:
7:"x_Phone";s:12:"509-242-7867";}i:2;a:7:{s:6:"RESULT";s:1:"1";s:
10:"RESULT_SUB";s:1:"1";s:11:"REASON_CODE";s:1:"1";s:7:"RESPMSG";s:
35:"This transaction has been approved.";s:3:"AVS";s:1:"Y";s:
5:"PNREF";s:10:"1424138585";s:9:"CVV_VALID";s:0:"";}s:
16:"orig_expire_date";s:10:"2007-06-05";s:8:"prorated";s:7:"3, 8,
8";}', '2007-06-25 09:28:38', 0,
'cc:d41d8cd98f00b204e9800998ecf8427e', 0, '2007-05-06 10:52:26',
'2007-05-06 10:52:28', '0.00');
INSERT INTO `amember_payments` VALUES (10712, 2006, 10, '2007-05-05',
'2008-05-05', 'authorize_aim', '', '147.00', 0, '71.229.108.131', 'a:6:
{s:15:"COUPON_DISCOUNT";N;s:10:"TAX_AMOUNT";N;s:5:"TAXES";N;i:0;a:1:{s:
12:"RENEWAL_ORIG";s:18:"RENEWAL_ORIG: 5711";}i:1;a:25:{s:7:"x_Login";s:
12:"478459b79866";s:9:"x_Version";s:3:"3.1";s:12:"x_Delim_Data";s:
4:"True";s:10:"x_Tran_Key";s:16:"eeRay89XQNAic8KJ";s:
12:"x_Delim_Char";s:1:"|";s:13:"x_Invoice_Num";s:9:"10712-465";s:
8:"x_Amount";s:6:"147.00";s:15:"x_Currency_Code";s:3:"USD";s:
10:"x_Card_Num";s:19:"**** **** **** 2785";s:10:"x_Exp_Date";s:
4:"0908";s:6:"x_Type";s:12:"AUTH_CAPTURE";s:16:"x_Relay_Response";s:
5:"FALSE";s:7:"x_Email";s:23:"(e-mail address removed)";s:
13:"x_Description";s:14:"AdTool Annual-";s:9:"x_Cust_ID";s:4:"2006";s:
12:"x_First_Name";s:9:"Dimitrios";s:11:"x_Last_Name";s:9:"Katsoulis";s:
9:"x_Address";s:18:"430 Briarvista Way";s:6:"x_City";s:7:"Atlanta";s:
7:"x_State";s:2:"GA";s:5:"x_Zip";s:5:"30329";s:9:"x_Country";s:
2:"US";s:9:"x_Company";s:0:"";s:13:"x_Customer_IP";s:
13:"24.98.190.106";s:7:"x_Phone";s:12:"404-634-0031";}i:2;a:7:{s:
6:"RESULT";s:1:"2";s:10:"RESULT_SUB";s:1:"1";s:11:"REASON_CODE";s:
1:"2";s:7:"RESPMSG";s:35:"This transaction has been declined.";s:
3:"AVS";s:1:"Y";s:5:"PNREF";s:10:"1424138607";s:9:"CVV_VALID";s:
0:"";}}', '2007-05-06 10:52:30', 0, '', 0, '2007-05-06 10:52:28',
NULL, '0.00');
INSERT INTO `amember_payments` VALUES (10713, 1574, 8, '2007-05-06',
'2007-06-06', 'authorize_aim', '', '19.95', 0, '71.229.108.131', 'a:6:
{s:15:"COUPON_DISCOUNT";N;s:10:"TAX_AMOUNT";N;s:5:"TAXES";N;i:0;a:1:{s:
12:"RENEWAL_ORIG";s:19:"RENEWAL_ORIG: 10192";}i:1;a:25:{s:
7:"x_Login";s:12:"478459b79866";s:9:"x_Version";s:3:"3.1";s:
12:"x_Delim_Data";s:4:"True";s:10:"x_Tran_Key";s:
16:"eeRay89XQNAic8KJ";s:12:"x_Delim_Char";s:1:"|";s:
13:"x_Invoice_Num";s:9:"10713-206";s:8:"x_Amount";s:5:"19.95";s:
15:"x_Currency_Code";s:3:"USD";s:10:"x_Card_Num";s:19:"**** **** ****
9006";s:10:"x_Exp_Date";s:4:"0407";s:6:"x_Type";s:12:"AUTH_CAPTURE";s:
16:"x_Relay_Response";s:5:"FALSE";s:7:"x_Email";s:
25:"(e-mail address removed)";s:13:"x_Description";s:11:"The
AdTool-";s:9:"x_Cust_ID";s:4:"1574";s:12:"x_First_Name";s:4:"John";s:
11:"x_Last_Name";s:9:"Flowerdew";s:9:"x_Address";s:14:"8A Oxted
Green";s:6:"x_City";s:18:"Milford, Godalming";s:7:"x_State";s:2:"XX";s:
5:"x_Zip";s:7:"GU8 5DA";s:9:"x_Country";s:2:"GB";s:9:"x_Company";s:
0:"";s:13:"x_Customer_IP";s:14:"80.176.190.185";s:7:"x_Phone";s:
15:"0044 1483861858";}i:2;a:7:{s:6:"RESULT";s:1:"3";s:
10:"RESULT_SUB";s:1:"1";s:11:"REASON_CODE";s:1:"8";s:7:"RESPMSG";s:
28:"The credit card has expired.";s:3:"AVS";s:1:"P";s:5:"PNREF";s:
1:"0";s:9:"CVV_VALID";s:0:"";}}', '2007-05-06 10:52:31', 0, '', 0,
'2007-05-06 10:52:30', NULL, '0.00');


Thanks for your help!
Erik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,192
Latest member
KalaReid2

Latest Threads

Top