Results 1 to 2 of 2
Thread: ePDQ problem
Jun 13, 2007, 02:06 #1
I m implementing ePDQ these days. I have few questions in my mind, if any one can help.
1. I have a form which takes input "amount" and basic information and send to epdq using traditional POST. thats fine. But the problem is that I wish to record the basic information in my database before it reaches epdq.
I get order id by using:
"SELECT MAX(id) + 1 as last_id FROM records_table "
$oid = $row['last_id']; // assume that connection and query is performed
Please help me.. What is the better way to store the information before it goes to the third party i.e ePDQ
Thanks in advance
Jun 13, 2007, 13:18 #2
- Join Date
- Mar 2005
- 0 Post(s)
- 0 Thread(s)
From SQL optimisation standpoint, you may replace your query with this one:
SELECT id + 1 AS last_id FROM records_table ORDER BY id DESC LIMIT 1
Older MySQL and PostgreSQL versions won't use an index for the original query, but can use for this query.