Jump to content

SQLite - Choosing the last Query result?


Recommended Posts

Hello big-minds:

I have a database with single table (Main):

Customer | Visit_Date | Num

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

Customer1| 1/1/2012|3

Customer2| 1/1/2012|1

Customer2| 2/1/2012|1

For example: I want the last visit date of Customer2 to be shown, so i'm trying:

_SQLite_Query(-1, "SELECT ROWID,* FROM Main WHERE Customer='Customer2' AND Num='1';", $hQuery)

When showing $hQuery[0] in a MessageBox it gives me the first result (1/1/2012), even when using _SQLite_FetchData, so how can i get the last result in the column (2/1/2012) ?

Thanx in advanced.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...