SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: ePDQ problem

  1. #1
    SitePoint Addict eanimator's Avatar
    Join Date
    Sep 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ePDQ problem

    Hello everyone,

    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

  2. #2
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    From SQL optimisation standpoint, you may replace your query with this one:
    Code SQL:
    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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •