Web Analytics Made Easy -
StatCounter Select Last Record - CodingForum

Announcement

Collapse
No announcement yet.

Select Last Record

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Select Last Record

    Hi

    I have this in my query:

    SELECT flash_data.flash_data, h_package_data.hpackage_data
    FROM flash_data, h_package_data

    What i want to do is add the values in two tables together? There are alos a load of other tables but i have only used two here. I want to be able to select the last entered record of each table, then add them together. I know i could just put a "+" but this will not work with all the rest of the tables and data i need to use.

    JAKE

  • #2
    I have no idea what you mean or what the problem is. Is it selecting the last inserted records? --> check the sticky on top of this forum. Or adding the values of the fields together ?
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

    Comment


    • #3
      Yeah, select the LAST INSERTED RECORD

      Comment


      • #4
        PHP Code:
        SELECT flash_data.flash_datah_package_data.hpackage_data
        FROM flash_data
        h_package_data ORDER BY createdatetime DESC LIMIT 1 
        Should be your query.

        Comment

        Working...
        X